diff options
Diffstat (limited to 'Panel/lemonbar/batterymon')
-rwxr-xr-x | Panel/lemonbar/batterymon | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Panel/lemonbar/batterymon b/Panel/lemonbar/batterymon index 27ea7a6..9d8c74d 100755 --- a/Panel/lemonbar/batterymon +++ b/Panel/lemonbar/batterymon @@ -1,13 +1,14 @@ #!/bin/sh while true;do -if [ `battery -f '%i'` -lt 4 ] && ! [ -z ~/.dontshut ]; then -touch ~/.dontshut -zenity --question --title "Battery" --text "Battery if pretty fucking low, go to sleep?" -if [ $? -ne 1 ];then -pm-suspend -fi -else -rm ~/.dontshut -fi + if [ `battery -f '%i'` -lt 4 ] && ! [ -z ~/.dontshut ]; then + touch ~/.dontshut + zenity --question --title "Battery" --text "Battery if pretty fucking low, go to sleep?" + if [ $? -ne 1 ];then + pm-suspend + fi + else + if [ -z ~/.dontshut ] + rm ~/.dontshut + fi sleep 180; done |