summaryrefslogtreecommitdiff
path: root/home/xyz/.local/bin/sbar
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2021-12-17 18:33:15 -0800
committerxyz <gky44px1999@gmail.com>2021-12-17 18:33:15 -0800
commitae16bfe49ecf02a52c33624946e73fc5ec27f39e (patch)
tree17c34e1fc86b9bbf9b3eb8aa85be1503f8f1eb21 /home/xyz/.local/bin/sbar
parent8f6e1c80ba99a0a88e54e247f95ec0d55a45c83e (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/xyz/.local/bin/sbar')
-rwxr-xr-xhome/xyz/.local/bin/sbar28
1 files changed, 12 insertions, 16 deletions
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