Compare commits

...

8 Commits

11 changed files with 205 additions and 9 deletions

View File

@ -1,2 +1,6 @@
bundle bundle
bundler bundler
rdoc
ri
syntax_suggest
update_rubygems

View File

@ -0,0 +1,113 @@
#!/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

View File

@ -135,7 +135,9 @@ stylesets-dirs=
# Sets the styleset to use for the aerc ui elements. # Sets the styleset to use for the aerc ui elements.
# #
# Default: default # Default: default
styleset-name=default border-char-vertical="│"
border-char-horizontal="─"
styleset-name=gruvbox-dark
# Activates fuzzy search in commands and their arguments: the typed string is # 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 # searched in the command or option in any position, and need not be

View File

@ -0,0 +1,53 @@
*.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

View File

@ -25,6 +25,7 @@ end
abbr -a batdiff "git diff --name-only --diff-filter=d | xargs bat --diff" abbr -a batdiff "git diff --name-only --diff-filter=d | xargs bat --diff"
abbr -a ggpush "git push origin (__git.current_branch)" abbr -a ggpush "git push origin (__git.current_branch)"
abbr -a ggpull "git pull 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 source ~/.config/fish/platform_config/$MACHINE_TYPE.fish

View File

@ -1,3 +1,4 @@
file:///home/ensar/Projects
file:///home/ensar/Documents file:///home/ensar/Documents
file:///home/ensar/Music file:///home/ensar/Music
file:///home/ensar/Pictures file:///home/ensar/Pictures

View File

@ -62,6 +62,10 @@ require("lint").linters_by_ft = {
gdscript = { "gdlint" }, 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 = { require("lint").linters.misspell = {
name = "Misspell", name = "Misspell",
stdin = true, stdin = true,

View File

@ -69,7 +69,7 @@ local servers = {
"omnisharp", "omnisharp",
"solang", "solang",
"terraformls", "terraformls",
"tsserver", "ts_ls",
"vale_ls", "vale_ls",
"vimls", "vimls",
"wgsl_analyzer", "wgsl_analyzer",
@ -92,13 +92,6 @@ vim.g.rustaceanvim = {
common_config.on_attach(client, bufnr) common_config.on_attach(client, bufnr)
end, end,
cmd = { "ra-multiplex" }, cmd = { "ra-multiplex" },
-- init_options = {
-- lspMux = {
-- version = "1",
-- method = "connect",
-- server = "rust-analyzer",
-- },
-- },
settings = { settings = {
["rust-analyzer"] = { ["rust-analyzer"] = {
checkOnSave = { checkOnSave = {

View File

@ -2,4 +2,9 @@ input type:pointer {
accel_profile flat 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 focus_follows_mouse yes

View File

@ -35,6 +35,7 @@
"cpu", "cpu",
"temperature", "temperature",
"custom/keyboard-layout", "custom/keyboard-layout",
"custom/mouse-battery",
"bluetooth", "bluetooth",
"battery", "battery",
"tray", "tray",
@ -91,6 +92,16 @@
"signal": 1, // SIGHUP "signal": 1, // SIGHUP
"tooltip": false "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": { "disk": {
"interval": 30, "interval": 30,
"format": " {percentage_used}%" "format": " {percentage_used}%"

View File

@ -69,6 +69,7 @@
#custom-apps-menu, #custom-apps-menu,
#custom-power-menu, #custom-power-menu,
#custom-notification, #custom-notification,
#custom-mouse-battery,
#idle_inhibitor, #idle_inhibitor,
#workspaces, #workspaces,
#backlight, #backlight,
@ -214,6 +215,14 @@
color: gray; color: gray;
} }
#custom-mouse-battery.warning {
color: orange;
}
#custom-mouse-battery.critical {
color: red;
}
#workspaces { #workspaces {
margin: 0px; margin: 0px;
} }