diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/osdbattery/showbatt |
Tue Apr 5 14:26:38 UTC 2011
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 |