diff options
Diffstat (limited to '.a')
| -rwxr-xr-x | .a/battery-status.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/.a/battery-status.sh b/.a/battery-status.sh index dcfae2d..2ad7157 100755 --- a/.a/battery-status.sh +++ b/.a/battery-status.sh @@ -41,7 +41,9 @@ if [ $bat_state = 'c' ]; then # Notify when battery discharges to 5%, 10%, 15% and 20% elif [ $bat_state = 'd' ]; then for per in 5 10 15 20; do - if [ "$bat_notif" != $per ] && [ $bat_per -le $per ]; then + if [ "$bat_notif" = $per ]; then + break + elif [ $bat_per -le $per ]; then notify-send -u critical -i battery-low -t 999999 "Battery ${per}%" echo $per > /tmp/bat_notif break |
