diff options
Diffstat (limited to 'community/osdbattery/showbatt')
-rw-r--r-- | community/osdbattery/showbatt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/community/osdbattery/showbatt b/community/osdbattery/showbatt new file mode 100644 index 000000000..440de592c --- /dev/null +++ b/community/osdbattery/showbatt @@ -0,0 +1,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 |