diff options
author | root <root@rshg054.dnsready.net> | 2013-08-13 01:33:19 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-08-13 01:33:19 -0700 |
commit | 7a65a910b77ad191d69881098c47f9b0c852d92e (patch) | |
tree | 9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/osdbattery/showbatt | |
parent | 60da6abff6c9577a783d72865f11de7a585e912e (diff) |
Tue Aug 13 01:31:08 PDT 2013
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 |