blob: 27ea7a60f1952ce93071c3d4031cbc38914bce84 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#!/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
sleep 180;
done
|