aboutsummaryrefslogtreecommitdiff
path: root/Panel/lemonbar/batterymon
blob: 9d8c74dbd17255aa820f9130db7e27ab7a7a294a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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
	if [ -z ~/.dontshut ]
		rm ~/.dontshut
	fi
sleep 180;
done