From ae16bfe49ecf02a52c33624946e73fc5ec27f39e Mon Sep 17 00:00:00 2001 From: xyz Date: Fri, 17 Dec 2021 18:33:15 -0800 Subject: 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 --- home/xyz/.local/bin/sbar | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'home/xyz/.local/bin/sbar') 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 -- cgit v1.2.3-70-g09d2