From 9aaeb4623d3ff5746e665bc17914eefd292b7dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20K=C3=BChling?= Date: Sun, 2 Jan 2011 15:19:00 +0100 Subject: New OpenWrt package for GNU Octave. Experimental/probably still broken. Work in progress. Committing it as compilation seems to take forever. Not sure whether I can finish this within a few days. --- triggersad/files/triggerhappy-example.conf | 14 ++++++++++++++ triggersad/files/triggerhappy.hotplug | 15 +++++++++++++++ triggersad/files/triggerhappy.init | 10 ++++++++++ 3 files changed, 39 insertions(+) create mode 100644 triggersad/files/triggerhappy-example.conf create mode 100644 triggersad/files/triggerhappy.hotplug create mode 100644 triggersad/files/triggerhappy.init (limited to 'triggersad/files') diff --git a/triggersad/files/triggerhappy-example.conf b/triggersad/files/triggerhappy-example.conf new file mode 100644 index 0000000..3a8017a --- /dev/null +++ b/triggersad/files/triggerhappy-example.conf @@ -0,0 +1,14 @@ +# This is an example configuration for the triggerhappy daemon (thd) +# please note that every file to be processed must end in ".conf" +# +# To view a list of supported event codes, use "thd --listevents" or +# "thd --dump /dev/input/event*" +# +# Format: +# +# +# values for key events are 1 (pressed), 0 (released) or 2 (held) +# +## control an mpd instance +# KEY_NEXTSONG 1 /usr/bin/mpc next +# KEY_PREVSONG 1 /usr/bin/mpc prev diff --git a/triggersad/files/triggerhappy.hotplug b/triggersad/files/triggerhappy.hotplug new file mode 100644 index 0000000..78ad349 --- /dev/null +++ b/triggersad/files/triggerhappy.hotplug @@ -0,0 +1,15 @@ +#!/bin/sh +THD_SOCKET=/tmp/triggerhappy.socket +[ -S "$THD_SOCKET" ] || exit + +case "$ACTION" in + add) + DEVICE="/dev/$DEVNAME" + [ -c "$DEVICE" ] || exit + # offer device to triggerhappy daemon + /usr/sbin/th-cmd --socket "$THD_SOCKET" --add "$DEVICE" + ;; + remove) + # nothing to do + ;; +esac diff --git a/triggersad/files/triggerhappy.init b/triggersad/files/triggerhappy.init new file mode 100644 index 0000000..e846d29 --- /dev/null +++ b/triggersad/files/triggerhappy.init @@ -0,0 +1,10 @@ +#!/bin/sh /etc/rc.common +START=93 + +start() { + /usr/sbin/thd --socket /tmp/triggerhappy.socket --triggers /etc/triggerhappy/triggers.d/ --daemon /dev/input/event* +} + +stop() { + /usr/sbin/th-cmd --socket /tmp/triggerhappy.socket --quit +} -- cgit v1.2.3