summaryrefslogtreecommitdiff
path: root/community/osdbattery/showbatt
blob: 440de592c7d43c400c16cb056c22b2a2a44e2148 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

# osdbattery start/stop script - best bound to a keyboard combo

PID=`pidof -o %PPID /usr/bin/osdbattery`
if [ -z "$PID" ] ; then
	/usr/bin/osdbattery &
	echo $PID > /var/run/osdbattery.pid
elif [ ! -z "$PID" ] ; then
	kill $PID &> /dev/null
	rm /var/run/osdbattery.pid
fi