summaryrefslogtreecommitdiff
path: root/community/osdbattery
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
committerroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
commit8fbc0076a4827ddc6af92e0b9daa4c4c31450808 (patch)
tree03fd0e2921ebd53228d9a93e32ed3976b636cbea /community/osdbattery
parente445a313723389ba9ee1fded025c567dae5b21ea (diff)
Fri Jul 19 01:09:18 PDT 2013
Diffstat (limited to 'community/osdbattery')
-rw-r--r--community/osdbattery/PKGBUILD36
-rw-r--r--community/osdbattery/osdbattery.install9
-rw-r--r--community/osdbattery/showbatt12
3 files changed, 57 insertions, 0 deletions
diff --git a/community/osdbattery/PKGBUILD b/community/osdbattery/PKGBUILD
new file mode 100644
index 000000000..1d2da5715
--- /dev/null
+++ b/community/osdbattery/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 76967 2012-10-02 18:09:45Z jlichtblau $
+# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+# Contributor: dibblethewrecker <dibblethewrecker@jiwe.org>
+
+pkgname=osdbattery
+pkgver=1.4
+pkgrel=5
+pkgdesc="Displays battery information in the OSD style"
+arch=('i686' 'x86_64')
+url="http://osdbattery.sourceforge.net/"
+license=('GPL2')
+depends=('xosd')
+makedepends=('patch')
+install=$pkgname.install
+source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}_${pkgver}.tar.gz
+ sysfs.patch::"http://sourceforge.net/tracker/download.php?group_id=120528&atid=687314&file_id=429967&aid=3450277"
+ showbatt)
+sha256sums=('b1f775c746cd78b6aa7fc9ee75ecf2806ef3da93a42dd806c0414dcae55aed9f'
+ 'd7a00e918929d36aaf3eb398649ea070ed6c4840e3da2407226fc5d9ae15d776'
+ '69969053235642315b49fe6ea5df7f8c391befbf492fd4ff71afbf4d438333b2')
+
+build() {
+ cd ${srcdir}/${pkgname}_${pkgver}
+
+ patch -i ${srcdir}/sysfs.patch
+
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}_${pkgver}
+
+ install -D -m755 $pkgname ${pkgdir}/usr/bin/${pkgname}
+ install -D -m755 ${srcdir}/showbatt ${pkgdir}/usr/bin/showbatt
+ install -D -m644 $pkgname.cfg ${pkgdir}/etc/${pkgname}/${pkgname}.cfg
+}
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