debian/0000755000000000000000000000000011562333247007174 5ustar debian/source/0000755000000000000000000000000011562331067010472 5ustar debian/source/format0000644000000000000000000000001411562331067011700 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000762011562331067011051 0ustar triggerhappy (0.3.4-2) unstable; urgency=low * beautify packaging information * First upload to Debian (Closes: #603842) -- Stefan Tomanek Wed, 13 Apr 2011 21:02:29 +0200 triggerhappy (0.3.4-1) unstable; urgency=low * fix segfault when dumping non-key events * update udev rules (SYSFS->ATTRS) -- Stefan Tomanek Wed, 09 Mar 2011 14:50:48 +0100 triggerhappy (0.3.3-1) unstable; urgency=low [ Stefan Tomanek ] * add licence headers to source files * increase version to 0.3.3 -- Stefan Tomanek Mon, 14 Feb 2011 13:15:54 +0100 triggerhappy (0.3.2-1) unstable; urgency=low * increase version to 0.3.2 * various bugfixes and code cleanups -- Stefan Tomanek Tue, 21 Dec 2010 13:16:52 +0100 triggerhappy (0.3.1-1) unstable; urgency=low * introduce CMD_NOP to ensure type safety * increase version number to 0.3.1 * modify package description -- Stefan Tomanek Sat, 18 Dec 2010 15:00:06 +0100 triggerhappy (0.3.0-1) unstable; urgency=low * rework config file parser * improve error detection for modifiers * improve error reporting * improve dropping of privileges * allow tagging of devices * new upstream version 0.3.0 -- Stefan Tomanek Fri, 10 Dec 2010 11:14:00 +0100 triggerhappy (0.2.1-1) unstable; urgency=low * fix segmentation fault when handling comment lines -- Stefan Tomanek Mon, 06 Dec 2010 02:04:31 +0100 triggerhappy (0.2.0-1) unstable; urgency=low * optionally grab the device exclusively * add uinput support for generating synthetic events * update udev rule * add version information into build -- Stefan Tomanek Mon, 06 Dec 2010 01:15:00 +0100 triggerhappy (0.1.6-2) unstable; urgency=low * change manpage sections according to "man 7 man-pages" * drop root privileges by default -- Stefan Tomanek Mon, 22 Nov 2010 09:12:18 +0100 triggerhappy (0.1.6-1) unstable; urgency=low * fix typo in changelog * suppress mode change message on startup * ignore the triggering key while checking modifier -- Stefan Tomanek Sun, 21 Nov 2010 22:17:50 +0100 triggerhappy (0.1.5-1) unstable; urgency=low * add "mode" support * make trigger mode changeable through th-cmd * try to autodetect the location of -- Stefan Tomanek Thu, 18 Nov 2010 15:36:06 +0100 triggerhappy (0.1.4-1) unstable; urgency=low [ Eduard Bloch ] * Minor modifications for better code safety [ Stefan Tomanek ] * update th-cmd cmdline parsing and add --clear * make --dump print skeleton lines for trigger conf * fix "Provides" in init script * fix typos in man page * fix description * add debian/watch -- Stefan Tomanek Thu, 18 Nov 2010 01:24:22 +0100 triggerhappy (0.1.3-1) unstable; urgency=low * drop root with --user * use sendmsg/recvmsg for socket communication * send opened fd from th-cmd to daemon * enhance init script and default config -- Stefan Tomanek Fri, 29 Oct 2010 21:06:12 +0200 triggerhappy (0.1.2-1) unstable; urgency=low * autogenerate event mapping table * add --listevents to list known event names -- Stefan Tomanek Thu, 28 Oct 2010 15:04:30 +0200 triggerhappy (0.1.1-1) unstable; urgency=low * fix off-by-one error in conf file filtering routine -- Stefan Tomanek Wed, 27 Oct 2010 16:49:16 +0200 triggerhappy (0.1.0-1) unstable; urgency=low * Initial release -- Stefan Tomanek Sat, 23 Oct 2010 10:59:38 +0200 debian/rules0000755000000000000000000000006111562331067010247 0ustar #!/usr/bin/make -f # -*- makefile -*- %: dh $@ debian/copyright0000644000000000000000000000237711562331067011136 0ustar This work was packaged for Debian by: Stefan Tomanek on Sat, 23 Oct 2010 10:59:38 +0200 It was downloaded from: http://github.com/wertarbyte/triggerhappy Upstream Author: Stefan Tomanek Copyright: Copyright (C) 2010 Stefan Tomanek License: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". The Debian packaging is: Copyright (C) 2010 Stefan Tomanek and is licensed under the GPL version 3, see above. debian/control0000644000000000000000000000340611562331067010600 0ustar Source: triggerhappy Section: utils Priority: extra Maintainer: Stefan Tomanek Build-Depends: debhelper (>= 7) Standards-Version: 3.9.2 Homepage: http://github.com/wertarbyte/triggerhappy Vcs-Git: git://github.com/wertarbyte/triggerhappy.git Vcs-Browser: http://github.com/wertarbyte/triggerhappy Package: triggerhappy Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: global hotkey daemon for Linux Triggerhappy watches connected input devices for certain key presses or other input events and runs administrator-configured commands when they occur. Unlike other hotkey daemons, it runs as a persistent, systemwide service and therefore can be used even outside the context of a user or X11 session. . It can handle a wide variety of devices (keyboards, joysticks, wiimote, etc.), as long as they are presented by the kernel as generic input devices. No kernel patch is required. The daemon is a userspace program that polls the /dev/input/event? interfaces for incoming key, button and switch events. A single daemon can monitor multiple input devices and can dynamically add additional ones. Hotkey handlers can be assigned to dedicated (tagged) devices or globally. . For example, this package might be useful on a headless system to use input events generated by a remote control to control an mpd server, but can also be used to allow the adjustment of audio and network status on a notebook without relying on user specific configuration. . Key combinations are supported as well as the hotplugging of devices using a udev hotplug script; the running daemon can also be influenced by a client program, e.g. to temporarily pause the processing of events or switch to a different set of hotkey bindings. debian/triggerhappy.default0000644000000000000000000000104411562331067013244 0ustar # Defaults for triggerhappy initscript # sourced by /etc/init.d/triggerhappy # installed at /etc/default/triggerhappy by the maintainer scripts # # This is a POSIX shell fragment # # Additional options that are passed to the Daemon. DAEMON_OPTS="" # The Triggerhappy daemon (thd) drops its root privileges after # startup and becomes "nobody". If you want it to retain its root # status (e.g. to run commands only accessible to the system user), # uncomment the following line or specifiy the user option yourself: # # DAEMON_OPTS="--user root" debian/docs0000644000000000000000000000004211562331067010041 0ustar README triggerhappy.conf.examples debian/watch0000644000000000000000000000013411562331067010221 0ustar version=3 http://githubredir.debian.net/github/wertarbyte/triggerhappy/ release/(.*).tar.gz debian/compat0000644000000000000000000000000211562331067010370 0ustar 7 debian/init.d0000644000000000000000000000614111562331067010304 0ustar #!/bin/sh ### BEGIN INIT INFO # Provides: triggerhappy # Required-Start: $local_fs $remote_fs # Required-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: triggerhappy hotkey daemon ### END INIT INFO # Author: Stefan Tomanek PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="input event daemon" NAME=thd PNAME=triggerhappy DAEMON=/usr/sbin/thd PIDFILE=/var/run/$NAME.pid DAEMON_ARGS="--daemon --triggers /etc/triggerhappy/triggers.d/ --socket /var/run/thd.socket --pidfile $PIDFILE --user nobody /dev/input/event*" DAEMON_OPTS="" SCRIPTNAME=/etc/init.d/$PNAME # Exit if the package is not installed [ -x $DAEMON ] || exit 0 # Read configuration variable file if it is present [ -r /etc/default/$PNAME ] && . /etc/default/$PNAME # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions # # Function that starts the daemon/service # do_start() { # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ || return 1 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ $DAEMON_ARGS $DAEMON_OPTS \ || return 2 } # # Function that stops the daemon/service # do_stop() { # Return # 0 if daemon has been stopped # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME RETVAL="$?" [ "$RETVAL" = 2 ] && return 2 # Many daemons don't delete their pidfiles when they exit. rm -f $PIDFILE return "$RETVAL" } # # Function that sends a SIGHUP to the daemon/service # do_reload() { # # If the daemon can reload its configuration without # restarting (for example, when it is sent a SIGHUP), # then implement that here. # start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME return 0 } case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME" do_start case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; stop) [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" do_stop case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; status) status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? ;; reload|force-reload) log_daemon_msg "Reloading $DESC" "$NAME" do_reload log_end_msg $? ;; restart) log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0|1) do_start case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; # Old process is still running *) log_end_msg 1 ;; # Failed to start esac ;; *) # Failed to stop log_end_msg 1 ;; esac ;; *) echo "Usage: $SCRIPTNAME {start|stop|status|restart|reload|force-reload}" >&2 exit 3 ;; esac : debian/dirs0000644000000000000000000000003511562331067010054 0ustar etc/triggerhappy/triggers.d/ debian/triggerhappy.udev0000777000000000000000000000000011562331067020461 2../udev/triggerhappy-udev.rulesustar