=pod

=head1 NAME

th-cmd -- triggerhappy commander

=head1 SYNOPSIS

B<th-cmd> --socket B<< <socket> >> [B<--passfd>] [B<--tag> I<< <foo> >>] [B<--clear>|B<--enable>|B<--disable>|B<--mode> I<< <mode> >>|B<--quit>|B<--udev>|B<--add> F<< <devices...> >>|B<--remove> F<< <devices...> >>]

=head1 DESCRIPTION

This program is used to issue commands to a running triggerhappy daemon. It utilizes an unix domain socket bound by the daemon.

=head1 OPTIONS

=over

=item B<--socket> F<socket>

The socket file opened by the running triggerhappy daemon instance.

=item B<--add> F<< <devices...> >>

Instruct the running daemon to open the input devices specified on the command line

=item B<--remove> F<< <devices...> >>

Remove specified devices from the running daemon.

=item B<--clear>

Remove all devices from the running daemon.

=item B<--udev>

Deduce operation and device name from udev environment (for use in udev rules).

=item B<--disable>

Disable the execution of triggers.

=item B<--enable>

Re-enable the execution of triggers.

=item B<--mode> I<< <newmode> >>

Change the mode of the triggerhappy daemon to I<< <newmode> >>. If no new mode is specified, the daemon switches to default mode.

=item B<--quit>

Terminate the triggerhappy daemon.

=item B<--passfd>

Instead of instructing the daemon to open the device, open the device and pass the file descriptor to the daemon. This allows the adding of new devices to a daemon having dropped its privileges, however the th-cmd process must have access to the device file.

=item B<--grab>

Grab the device; the triggerhappy daemon will try to get exclusive access to the device, other applications will not receive the events emitted by it.

=item B<--tag> F<foo>

Label the added device with the tag I<< <foo> >>; this can be used to limit the scope of event
handlers to a subset of input devices.

=back

=head1 AUTHOR

Stefan Tomanek E<lt>stefan.tomanek+th@wertarbyte.deE<gt>

