diff --git a/blocks/battery_button.sh b/blocks/battery_button.sh index a937fe4..52efd33 100755 --- a/blocks/battery_button.sh +++ b/blocks/battery_button.sh @@ -16,23 +16,23 @@ fi hr=$(( val / rate )) mn=$(( (val * 60) / rate - hr * 60 )) -case "$hr" in +case $hr in 0) - case "$mn" in + case $mn in 0) notify-send "Battery fully charged" ;; 1) notify-send "1 minute remaining" ;; *) notify-send "$mn minutes remaining" ;; esac ;; 1) - case "$mn" in + case $mn in 0) notify-send "1 hour remaining" ;; 1) notify-send "1 hour, 1 minute remaining" ;; *) notify-send "1 hour, $mn minutes remaining" ;; esac ;; *) - case "$mn" in + case $mn in 0) notify-send "$hr hours remaining" ;; 1) notify-send "$hr hours, 1 minute remaining" ;; *) notify-send "$hr hours, $mn minutes remaining" ;; diff --git a/blocks/cpu_temp_button.sh b/blocks/cpu_temp_button.sh index fdf8f70..4d6efe9 100755 --- a/blocks/cpu_temp_button.sh +++ b/blocks/cpu_temp_button.sh @@ -1,5 +1,5 @@ #!/bin/sh -case "$1" in +case $1 in 1) exec termite -e "htop -s PERCENT_CPU" ;; 2) exec termite -e "htop" ;; 3) exec termite -e "htop -s PERCENT_MEM" ;; diff --git a/blocks/volume_button.sh b/blocks/volume_button.sh index 719ee31..7cfb961 100755 --- a/blocks/volume_button.sh +++ b/blocks/volume_button.sh @@ -1,5 +1,5 @@ #!/bin/sh -case "$1" in +case $1 in 1) pamixer --toggle-mute ;; 2) exec pavucontrol-qt ;; 3) pamixer --set-volume 60 ;; diff --git a/daemons/pulse_daemon.sh b/daemons/pulse_daemon.sh index f051374..1db448d 100755 --- a/daemons/pulse_daemon.sh +++ b/daemons/pulse_daemon.sh @@ -1,7 +1,7 @@ #!/bin/sh pactl subscribe | while read -r output ; do - case "$output" in + case $output in *"sink "*) sigdwmblocks 1 ;; esac done