aboutsummaryrefslogtreecommitdiff
path: root/Panel/lemonbar/batterymon
blob: efee0a94b58fcde4abe098368415db695d7b219b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
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
sleep 180;
done