summaryrefslogtreecommitdiff
path: root/community/esekeyd
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/esekeyd
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/esekeyd')
-rw-r--r--community/esekeyd/PKGBUILD34
-rw-r--r--community/esekeyd/esekeyd.conf31
-rw-r--r--community/esekeyd/esekeyd.confd4
-rw-r--r--community/esekeyd/esekeyd.rc51
4 files changed, 120 insertions, 0 deletions
diff --git a/community/esekeyd/PKGBUILD b/community/esekeyd/PKGBUILD
new file mode 100644
index 000000000..b0122e70f
--- /dev/null
+++ b/community/esekeyd/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 26092 2010-09-13 13:45:21Z cbrannon $
+# Maintainer: Chris Brannon <cmbrannon79@gmail.com>
+# Contributor: Roman Kyrylych <Roman.Kyrylych@gmail.com>
+# Contributor: Evgenij Vdovin <evdovin@pochta.ru>
+
+pkgname=esekeyd
+pkgver=1.2.7
+pkgrel=1
+pkgdesc="Multimedia keyboard driver for Linux"
+arch=('i686' 'x86_64')
+url="http://freshmeat.net/projects/esekeyd/"
+license=('GPL')
+depends=('glibc' 'sh')
+source=(http://www.burghardt.pl/files/$pkgname-$pkgver.tar.gz
+ esekeyd.rc esekeyd.confd esekeyd.conf)
+backup=('etc/conf.d/esekeyd' 'etc/esekeyd.conf')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+ install -D -m755 "$srcdir/esekeyd.rc" "$pkgdir/etc/rc.d/esekeyd"
+ install -D -m644 "$srcdir/esekeyd.confd" "$pkgdir/etc/conf.d/esekeyd"
+ install -D -m644 "$srcdir/esekeyd.conf" "$pkgdir/etc/esekeyd.conf"
+}
+md5sums=('5937ad6d7815dbc6ab6983411a9f37d4'
+ '1c1b954265ad29de010b1dd750350ed2'
+ '5edf18376549251daacd49ae136ba984'
+ 'f16c1aefe84214856f3a7e49a1a866f3')
diff --git a/community/esekeyd/esekeyd.conf b/community/esekeyd/esekeyd.conf
new file mode 100644
index 000000000..c391a9670
--- /dev/null
+++ b/community/esekeyd/esekeyd.conf
@@ -0,0 +1,31 @@
+#
+# ESE Key Deamon 1.2.1 config file
+#
+
+# Note: esekeyd runs all commands as root!
+# In order to run commands as user you should call them this way:
+#CALC:su -l username -c "/bin/bash -l -c 'DISPLAY=:0 gcalctool &'"
+#
+# Note that it is impossible to use xdg-utils and some Gnome/KDE applications
+# because some vital environment variables are set after desktop session start,
+# so shell session started via su won't have them
+
+#BACK:
+#FORWARD:
+#STOP:
+#REFRESH:
+#SEARCH:
+#BOOKMARKS:/bin/sh -c "DISPLAY=:0 xterm &"
+#WWW:
+#MAIL:
+#PREVIOUSSONG:mpc prev &
+#STOPCD:mpc stop &
+#PLAYPAUSE:mpc toggle &
+#NEXTSONG:mpc next &
+#VOLUMEDOWN:amixer set Master 5%- &
+#VOLUMEUP:amixer set Master 5%+ &
+#MUTE:amixer set Master toggle &
+#MEDIA:mpc update &
+#COMPUTER:
+#CALC:/bin/sh -c "DISPLAY=:0 xcalc &"
+#SLEEP:/bin/sh -c "DISPLAY=:0 xset dpms force standby &"
diff --git a/community/esekeyd/esekeyd.confd b/community/esekeyd/esekeyd.confd
new file mode 100644
index 000000000..1fd9a0940
--- /dev/null
+++ b/community/esekeyd/esekeyd.confd
@@ -0,0 +1,4 @@
+CONFIG=/etc/esekeyd.conf
+# set input device manually if it cannot be autodetected
+# DEVICE=/dev/input/event1
+KEYCODES=('e00e:148' 'e00c:149')
diff --git a/community/esekeyd/esekeyd.rc b/community/esekeyd/esekeyd.rc
new file mode 100644
index 000000000..67dd42265
--- /dev/null
+++ b/community/esekeyd/esekeyd.rc
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# Start/stop/restart the key daemon.
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+keystune(){
+ for keycode in "${KEYCODES[@]}"; do
+ key=`echo $keycode | cut -d: -f1`
+ code=`echo $keycode | cut -d: -f2`
+ setkeycodes $key $code
+ done
+}
+
+# source application-specific settings
+CONFIG=
+KEYCODES=
+DEVICE=
+[ -f /etc/conf.d/esekeyd ] && . /etc/conf.d/esekeyd
+
+PID=`pidof -o %PPID /usr/sbin/esekeyd`
+case "$1" in
+ start)
+ stat_busy "Starting esekeyd"
+ [ "$KEYCODES" ] && keystune
+ [ -z "$PID" ] && /usr/sbin/esekeyd $CONFIG $DEVICE &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon esekeyd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping esekeyd"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon esekeyd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0