diff options
author | xyz <gky44px1999@gmail.com> | 2021-12-17 18:33:15 -0800 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2021-12-17 18:33:15 -0800 |
commit | ae16bfe49ecf02a52c33624946e73fc5ec27f39e (patch) | |
tree | 17c34e1fc86b9bbf9b3eb8aa85be1503f8f1eb21 /home | |
parent | 8f6e1c80ba99a0a88e54e247f95ec0d55a45c83e (diff) |
remove sxhkd, use dwm for hotkeys, because sxhkd sometimes does not respond to alt + shift + Print, seems not issue of sxhkd but I do not want to debug it
Diffstat (limited to 'home')
-rw-r--r-- | home/xyz/.config/sxhkd/sxhkdrc | 64 | ||||
-rwxr-xr-x | home/xyz/.local/bin/sbar | 28 | ||||
-rw-r--r-- | home/xyz/.xinitrc | 1 |
3 files changed, 12 insertions, 81 deletions
diff --git a/home/xyz/.config/sxhkd/sxhkdrc b/home/xyz/.config/sxhkd/sxhkdrc deleted file mode 100644 index 960071e2..00000000 --- a/home/xyz/.config/sxhkd/sxhkdrc +++ /dev/null @@ -1,64 +0,0 @@ -Print - ffmpeg -f x11grab -i "$DISPLAY" -vframes 1 "$XDG_PICTURES_DIR/screenshots/$(time.uuid).png" - -alt + Print - xrectsel '%w %h %x %y' | xargs sh -c 'ffmpeg -f x11grab -s "$1"x"$2" -i "$DISPLAY+$3,$4" -vframes 1 "$XDG_PICTURES_DIR/screenshots/$(time.uuid).png"' shell - -alt + shift + Print - reco - -XF86Audio{RaiseVolume,LowerVolume,Mute} - amixer set Master {5%+,5%-,toggle};\ - kill -RTMIN+1 "$(cat "$XDG_CACHE_HOME/pidofbar")" - -alt + XF86AudioMute - amixer set Capture toggle;\ - kill -RTMIN "$(cat "$XDG_CACHE_HOME/pidofbar")" - -XF86Audio{Prev,Play,Next} - playerctl {previous,play-pause,next} - -@Caps_Lock - kill -RTMIN+3 "$(cat "$XDG_CACHE_HOME/pidofbar")" - -alt + y - mpvy -s - -alt + shift + y - mpvy -a - -alt + ctrl + y - tsp mpvy -A -u "$(xsel -ob)" - -alt + w - "$BROWSER" - -# not ideal -alt + shift + w - mullvad-exclude "$BROWSER" - -alt + s - shufwall - -# not ideal -alt + v - if mullvad status | grep -q 'Disconnect'; then mullvad connect -w; else killall qbittorrent; mullvad disconnect -w; fi;\ - kill -RTMIN+4 "$(cat "$XDG_CACHE_HOME/pidofbar")" - -# not ideal -alt + q - mullvad connect -w;\ - kill -RTMIN+4 "$(cat "$XDG_CACHE_HOME/pidofbar")";\ - qbittorrent - -# close dunst Notification -alt + n - dunstctl close - -alt + shift + n - alarm 12 'Boiling Water!' - -alt + r - xsel -ob | rev | xsel -ib - -# vim: ft=sh diff --git a/home/xyz/.local/bin/sbar b/home/xyz/.local/bin/sbar index 32e46c67..52aa1b64 100755 --- a/home/xyz/.local/bin/sbar +++ b/home/xyz/.local/bin/sbar @@ -56,7 +56,6 @@ update_bat () { # modules that don't update on their own need to be run at the start for getting their initial value update_vol update_mic -update_cap update_vpn display () { @@ -76,19 +75,16 @@ trap "update_vpn;display" "RTMIN+4" # where m = 34 + n while true; do - # next line of code seems make hotkeys that send kill signals more responsive? not fully understood - sleep 1 & wait && { - # to update item ever n seconds with a offset of m - ## [ $((sec % n)) -eq m ] && udpate_item - [ $((sec % 5 )) -eq 0 ] && update_time # update time every 5 seconds - [ $((sec % 5 )) -eq 0 ] && update_net - # mullvad like writing log when asking it about status - #[ $((sec % 5 )) -eq 0 ] && update_vpn - [ $((sec % 60)) -eq 0 ] && update_bat - #[ $((sec % 300)) -eq 1 ] && update_event - - # how often the display updates ( 5 seconds ) - [ $((sec % 5 )) -eq 0 ] && display - sec=$((sec + 1)) - } + sleep 1 & + wait + [ $((sec % 5 )) -eq 0 ] && update_time # update time every 5 seconds + [ $((sec % 5 )) -eq 0 ] && update_net + # mullvad like writing log when asking it about status + #[ $((sec % 5 )) -eq 0 ] && update_vpn + update_cap + [ $((sec % 60)) -eq 0 ] && update_bat + #[ $((sec % 300)) -eq 1 ] && update_event + # how often the display updates ( 5 seconds ) + [ $((sec % 5 )) -eq 0 ] && display + sec=$((sec + 1)) done diff --git a/home/xyz/.xinitrc b/home/xyz/.xinitrc index 95f87335..91426d60 100644 --- a/home/xyz/.xinitrc +++ b/home/xyz/.xinitrc @@ -47,7 +47,6 @@ dunst & fcitx5 -d redshift & sbar & -sxhkd & udiskie & # xorg-server 21.1.1-2 set correct dpi for my computer, but I choose to take the blue pill # Attention, don't use & at the end otherwise dwm status bar won't have proper dpi. |