aboutsummaryrefslogtreecommitdiff
path: root/Window_Manager/ratpoison/panel/batterymon
blob: 19a4d5ae0275b968a20651ab3615e79c562a95f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
while true;do
if [ `battery -f '%i'` -lt 5 ] && ! [ -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 30;
done