From 415856bdd4f48ab4f2732996f0bae58595092bbe Mon Sep 17 00:00:00 2001 From: Parabola Date: Tue, 5 Apr 2011 14:26:38 +0000 Subject: Tue Apr 5 14:26:38 UTC 2011 --- community/osdbattery/PKGBUILD | 22 ++++++++++++++++++++++ community/osdbattery/osdbattery.install | 9 +++++++++ community/osdbattery/showbatt | 12 ++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 community/osdbattery/PKGBUILD create mode 100644 community/osdbattery/osdbattery.install create mode 100644 community/osdbattery/showbatt (limited to 'community/osdbattery') diff --git a/community/osdbattery/PKGBUILD b/community/osdbattery/PKGBUILD new file mode 100644 index 000000000..62eced75b --- /dev/null +++ b/community/osdbattery/PKGBUILD @@ -0,0 +1,22 @@ +# $Id: PKGBUILD 7260 2010-01-03 16:12:31Z ibiru $ +# Contributor: dibblethewrecker +pkgname=osdbattery +pkgver=1.4 +pkgrel=3 +pkgdesc="Displays battery information in the OSD style" +arch=('i686' 'x86_64') +url="http://osdbattery.sourceforge.net" +license=("GPL2") +depends=('xosd') +install=osdbattery.install +source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname\_$pkgver.tar.gz showbatt) +md5sums=('43f9cc0428b6cb25baf1e6e2286e88b1' 'a786cd645135a369c8ed55b837174c92') + +build() { + cd $startdir/src/$pkgname\_$pkgver + make || return 1 + install -D -m755 $startdir/src/$pkgname\_$pkgver/$pkgname $startdir/pkg/usr/bin/$pkgname + install -D -m755 $startdir/src/showbatt $startdir/pkg/usr/bin/showbatt + install -D -m644 $startdir/src/$pkgname\_$pkgver/$pkgname.cfg $startdir/pkg/etc/$pkgname/$pkgname.cfg +} +# vim:syntax=sh diff --git a/community/osdbattery/osdbattery.install b/community/osdbattery/osdbattery.install new file mode 100644 index 000000000..7c1294e9c --- /dev/null +++ b/community/osdbattery/osdbattery.install @@ -0,0 +1,9 @@ +post_install() { + echo " : Remember to copy /etc/osdbattery/osdbattery.cfg to a ".osdbattery" directory in your home dir" + echo " : mkdir ~/.osdbattery" + echo " : cp /etc/osdbattery/osdbattery.cfg ~/.osdbattery" + echo + echo " : The /usr/bin/showbatt script can be bound to a key combo to" + echo " : easily show and hide the monitor" +} + 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 -- cgit v1.2.3-54-g00ecf