1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2025-04-21 12:27:27 +03:00

add triggerhappy hotkey daemon

Triggerhappy is a lightweight hotkey daemon that can launch arbitrary commands
on input events. It supports the hotplugging of devices and the processing of
key combinations.

Signed-off-by: Stefan Tomanek <stefan.tomanek+openwrt@wertarbyte.de>
This commit is contained in:
Stefan Tomanek
2010-11-12 11:17:50 +01:00
committed by Xiangfu Liu
parent dca49397c2
commit 4dcfd38b2f
4 changed files with 90 additions and 0 deletions

View File

@@ -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