Compare commits
No commits in common. "785e1e57e89ac96be1f7b3dfcc75b4cf755cd486" and "96a790fed17e3e9c4c8235444bcc5d716f86ff42" have entirely different histories.
785e1e57e8
...
96a790fed1
|
@ -1,6 +1,2 @@
|
|||
bundle
|
||||
bundler
|
||||
rdoc
|
||||
ri
|
||||
syntax_suggest
|
||||
update_rubygems
|
||||
|
|
|
@ -1,113 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
. ~/.local/opt/script_utils/echo.sh
|
||||
|
||||
usage () {
|
||||
if [ ! -z "$1" ]; then
|
||||
echo -e "Unknown peripheral: $1 \n"
|
||||
fi
|
||||
echo "Basic peripheral info component for waybar."
|
||||
echo -e "\nUsage: peripheral-waybar PERIPHERAL"
|
||||
echo "Options:"
|
||||
echo " -h --help - prints this help message (if one of commands is passed, prints help message for that command)"
|
||||
echo " -v --verbose - enables verbose logging"
|
||||
echo " -c --check - checks if component should be displayed"
|
||||
echo " -n --notify - show a notification with full info"
|
||||
if [ ! -z "$1" ]; then
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
POSITIONAL=()
|
||||
HELP=0
|
||||
VERBOSE=0
|
||||
CHECK=0
|
||||
NOTIFY=0
|
||||
while [[ $# -gt 0 ]]; do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-h|--help)
|
||||
HELP=1
|
||||
shift # past argument
|
||||
;;
|
||||
-v|--verbose)
|
||||
VERBOSE=1
|
||||
shift # past argument
|
||||
;;
|
||||
-c|--check)
|
||||
CHECK=1
|
||||
shift # past argument
|
||||
;;
|
||||
-n|--notify)
|
||||
NOTIFY=1
|
||||
shift # past argument
|
||||
;;
|
||||
*) # unknown option
|
||||
POSITIONAL+=("$1") # save it in an array for later
|
||||
shift # past argument
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
PERIPHERAL="${POSITIONAL[0]}"
|
||||
|
||||
echov "Detected peripheral: $PERIPHERAL"
|
||||
|
||||
if [ $HELP -eq 1 ]; then
|
||||
usage $PERIPHERAL
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mouse_waybar () {
|
||||
LAST_UPDATE_FILE=$MY_CONFIG_CACHE_DIR/peripheral-waybar-mouse-last-update
|
||||
LAST_STATUS_FILE=$MY_CONFIG_CACHE_DIR/peripheral-waybar-mouse-last-status
|
||||
if [ ! -f "$LAST_UPDATE_FILE" ]; then
|
||||
UPG_DATE=0
|
||||
else
|
||||
UPG_DATE=$(cat $LAST_UPDATE_FILE)
|
||||
fi
|
||||
if [ -z "$UPG_DATE" ]; then
|
||||
UPG_DATE=0
|
||||
fi
|
||||
CURR_DATE=$( date +%s )
|
||||
DIFF=$(( CURR_DATE - UPG_DATE ))
|
||||
if (( DIFF > 32 )); then
|
||||
BATTERY_LEVEL=$(rivalcfg --battery-level)
|
||||
echo $CURR_DATE > $LAST_UPDATE_FILE
|
||||
echo $BATTERY_LEVEL > $LAST_STATUS_FILE
|
||||
else
|
||||
BATTERY_LEVEL=$(cat $LAST_STATUS_FILE)
|
||||
fi
|
||||
if [ $CHECK -eq 1 ]; then
|
||||
if [[ $BATTERY_LEVEL == *"Unable"* ]]; then
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
if [ $NOTIFY -eq 1 ]; then
|
||||
notify-send "Mouse battery level" "$BATTERY_LEVEL"
|
||||
exit 0
|
||||
fi
|
||||
TOOLTIP=$BATTERY_LEVEL
|
||||
PERCENTAGE=$(echo $BATTERY_LEVEL | cut -d ']' -f2 | tr -d ' ' | tr -d '%')
|
||||
CLASS="default"
|
||||
if (( PERCENTAGE < 30 )); then
|
||||
CLASS="warning"
|
||||
fi
|
||||
if (( PERCENTAGE < 15 )); then
|
||||
CLASS="critical"
|
||||
fi
|
||||
echo "{\"text\":\"$PERCENTAGE%\", \"tooltip\":\"$TOOLTIP\", \"class\":\"$CLASS\", \"alt\":\"$CLASS\", \"percentage\":\"$PERCENTAGE\"}"
|
||||
}
|
||||
|
||||
case $PERIPHERAL in
|
||||
mouse)
|
||||
mouse_waybar
|
||||
;;
|
||||
*)
|
||||
usage $PERIPHERAL; exit 1 ;;
|
||||
esac
|
|
@ -135,9 +135,7 @@ stylesets-dirs=
|
|||
# Sets the styleset to use for the aerc ui elements.
|
||||
#
|
||||
# Default: default
|
||||
border-char-vertical="│"
|
||||
border-char-horizontal="─"
|
||||
styleset-name=gruvbox-dark
|
||||
styleset-name=default
|
||||
|
||||
# Activates fuzzy search in commands and their arguments: the typed string is
|
||||
# searched in the command or option in any position, and need not be
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
*.default=true
|
||||
*.normal=true
|
||||
*.selected.bold=true
|
||||
*.selected.bg=#ebdbb2
|
||||
*.selected.fg=#282828
|
||||
|
||||
default.fg=#ebdbb2
|
||||
|
||||
error.fg=#cc241d
|
||||
warning.fg=#d65d0e
|
||||
success.fg=#b8bb26
|
||||
|
||||
tab.fg=#7c6f64
|
||||
tab.bg=#282828
|
||||
tab.selected.fg=#d5c4a1
|
||||
tab.selected.bg=#282828
|
||||
tab.selected.bold=true
|
||||
|
||||
border.fg=#d5c4a1
|
||||
border.bold=true
|
||||
|
||||
msglist_unread.bold=true
|
||||
msglist_unread.fg=#b8bb26
|
||||
msglist_unread.selected.bg=#b8bb26
|
||||
msglist_unread.selected.fg=#282828
|
||||
msglist_flagged.fg=#f9e2af
|
||||
msglist_flagged.bold=true
|
||||
msglist_result.fg=#458588
|
||||
msglist_result.bold=true
|
||||
msglist_*.selected.bold=true
|
||||
msglist_*.selected.bg=#ebdbb2
|
||||
|
||||
dirlist_*.selected.bold=true
|
||||
dirlist_*.selected.bg=#ebdbb2
|
||||
|
||||
statusline_default.fg=#ebdbb2
|
||||
statusline_default.bg=#282828
|
||||
statusline_error.bold=true
|
||||
statusline_success.bold=true
|
||||
|
||||
[viewer]
|
||||
url.fg=#458588
|
||||
url.underline=true
|
||||
header.bold=true
|
||||
signature.dim=true
|
||||
diff_meta.bold=true
|
||||
diff_chunk.fg=#458588
|
||||
diff_chunk_func.fg=#458588
|
||||
diff_chunk_func.bold=true
|
||||
diff_add.fg=#b8bb26
|
||||
diff_del.fg=#cc241d
|
||||
quote_*.fg=#d5c4a1
|
||||
quote_1.fg=#b16286
|
|
@ -25,7 +25,6 @@ end
|
|||
abbr -a batdiff "git diff --name-only --diff-filter=d | xargs bat --diff"
|
||||
abbr -a ggpush "git push origin (__git.current_branch)"
|
||||
abbr -a ggpull "git pull origin (__git.current_branch)"
|
||||
abbr -a gcm "git checkout (__git.default_branch)"
|
||||
|
||||
source ~/.config/fish/platform_config/$MACHINE_TYPE.fish
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
file:///home/ensar/Projects
|
||||
file:///home/ensar/Documents
|
||||
file:///home/ensar/Music
|
||||
file:///home/ensar/Pictures
|
||||
|
|
|
@ -62,10 +62,6 @@ require("lint").linters_by_ft = {
|
|||
gdscript = { "gdlint" },
|
||||
}
|
||||
|
||||
local codespell_config = require("lint").linters.codespell
|
||||
table.insert(codespell_config.args, 0, "crate")
|
||||
table.insert(codespell_config.args, 0, "-L")
|
||||
|
||||
require("lint").linters.misspell = {
|
||||
name = "Misspell",
|
||||
stdin = true,
|
||||
|
|
|
@ -69,7 +69,7 @@ local servers = {
|
|||
"omnisharp",
|
||||
"solang",
|
||||
"terraformls",
|
||||
"ts_ls",
|
||||
"tsserver",
|
||||
"vale_ls",
|
||||
"vimls",
|
||||
"wgsl_analyzer",
|
||||
|
@ -92,6 +92,13 @@ vim.g.rustaceanvim = {
|
|||
common_config.on_attach(client, bufnr)
|
||||
end,
|
||||
cmd = { "ra-multiplex" },
|
||||
-- init_options = {
|
||||
-- lspMux = {
|
||||
-- version = "1",
|
||||
-- method = "connect",
|
||||
-- server = "rust-analyzer",
|
||||
-- },
|
||||
-- },
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
checkOnSave = {
|
||||
|
|
|
@ -2,9 +2,4 @@ input type:pointer {
|
|||
accel_profile flat
|
||||
}
|
||||
|
||||
input type:tablet_tool {
|
||||
map_to_output HDMI-A-1
|
||||
map_from_region 0.0x0.0 1.0x0.9
|
||||
}
|
||||
|
||||
focus_follows_mouse yes
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
"cpu",
|
||||
"temperature",
|
||||
"custom/keyboard-layout",
|
||||
"custom/mouse-battery",
|
||||
"bluetooth",
|
||||
"battery",
|
||||
"tray",
|
||||
|
@ -92,16 +91,6 @@
|
|||
"signal": 1, // SIGHUP
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/mouse-battery": {
|
||||
"interval": 5,
|
||||
"exec": "source ~/.profile && peripheral-waybar mouse",
|
||||
"exec-if": "which rivalcfg && source ~/.profile && peripheral-waybar --check mouse",
|
||||
"on-click": "source ~/.profile && peripheral-waybar --notify mouse",
|
||||
"format": " {}", // Icon: mouse
|
||||
"tooltip": false,
|
||||
"exec-on-event": false,
|
||||
"return-type": "json"
|
||||
},
|
||||
"disk": {
|
||||
"interval": 30,
|
||||
"format": " {percentage_used}%"
|
||||
|
|
|
@ -69,7 +69,6 @@
|
|||
#custom-apps-menu,
|
||||
#custom-power-menu,
|
||||
#custom-notification,
|
||||
#custom-mouse-battery,
|
||||
#idle_inhibitor,
|
||||
#workspaces,
|
||||
#backlight,
|
||||
|
@ -215,14 +214,6 @@
|
|||
color: gray;
|
||||
}
|
||||
|
||||
#custom-mouse-battery.warning {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
#custom-mouse-battery.critical {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
margin: 0px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue