diff options
author | xyz <gky44px1999@gmail.com> | 2021-10-06 11:29:41 -0700 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2021-10-06 11:29:41 -0700 |
commit | 10597d35e5dd2b2e6f462406f72578d9f09c1ed8 (patch) | |
tree | 1ac44e7867da2a78f5da67bffac1672caf1c39d9 /.local | |
parent | 18ab2192de9940bc057d69b527ba288e21b33b69 (diff) |
refactor
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/sbar | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/.local/bin/sbar b/.local/bin/sbar index feadd805..70191372 100755 --- a/.local/bin/sbar +++ b/.local/bin/sbar @@ -3,7 +3,7 @@ # modified to fit my own need # INIT -printf '%s' "$$" > ~/.cache/pidofbar +printf '%s' "$$" > "$XDG_CACHE_HOME/pidofbar" sec=0 # MODULES @@ -48,18 +48,17 @@ display () { } # SIGNALLING -# trap "<function>;display" "RTMIN+n" -trap "update_mic;display" "RTMIN" -trap "update_vol;display" "RTMIN+1" +# trap "<function>;display" "RTMIN+n" +trap "update_mic;display" "RTMIN" +trap "update_vol;display" "RTMIN+1" # xev can't read my toggle internet keyboard key, don't know what key to use in sxhkd to send signal -trap "update_net;display" "RTMIN+2" -trap "update_cap;display" "RTMIN+3" +trap "update_net;display" "RTMIN+2" +trap "update_cap;display" "RTMIN+3" # to update it from external commands -## kill -m "$(cat ~/.cache/pidofbar)" +## kill -m "$(cat "$XDG_CACHE_HOME/pidofbar")" # where m = 34 + n -while true -do +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 |