Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewshadura/inputplug
XInput event monitor daemon
https://github.com/andrewshadura/inputplug
rust-lang x11 xinput
Last synced: about 1 month ago
JSON representation
XInput event monitor daemon
- Host: GitHub
- URL: https://github.com/andrewshadura/inputplug
- Owner: andrewshadura
- License: mit
- Created: 2020-01-18T12:19:11.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-02-23T09:53:29.000Z (9 months ago)
- Last Synced: 2024-05-02T01:26:58.173Z (7 months ago)
- Topics: rust-lang, x11, xinput
- Language: Rust
- Homepage:
- Size: 56.6 KB
- Stars: 33
- Watchers: 5
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
inputplug
=========inputplug is a very simple daemon which monitors XInput events and runs
arbitrary scripts on hierarchy change events (such as a device being
attached, removed, enabled or disabled).To build the project, run `cargo build`.
* * *
# NAME
inputplug — XInput event monitor
# SYNOPSIS
**inputplug** \[**-v**\] \[**-n**\] \[**-d**\] \[**-0**\] **-c** _command-prefix_
**inputplug** \[**-h**|**--help**\]
# DESCRIPTION
**inputplug** is a daemon which connects to a running X server
and monitors its XInput hierarchy change events. Such events arrive
when a device is being attached or removed, enabled or disabled etc.When a hierarchy change happens, **inputplug** parses the event notification
structure, and calls the command specified by _command-prefix_. The command
receives four arguments:* _command-prefix_ _event-type_ _device-id_ _device-type_ _device-name_
Event type may be one of the following:
* _XIMasterAdded_
* _XIMasterRemoved_
* _XISlaveAdded_
* _XISlaveRemoved_
* _XISlaveAttached_
* _XISlaveDetached_
* _XIDeviceEnabled_
* _XIDeviceDisabled_Device type may be any of those:
* _XIMasterPointer_
* _XIMasterKeyboard_
* _XISlavePointer_
* _XISlaveKeyboard_
* _XIFloatingSlave_Device identifier is an integer. The device name may have embedded spaces.
# OPTIONS
A summary of options is included below.
* **-h**, **--help**
Show help (**--help** shows more details).
* **-v**
Be a bit more verbose.
* **-n**
Start up, monitor events, but don't actually run anything.
With verbose more enabled, would print the actual command it'd
run. This implies **-d**.* **-d**
Don't daemonise. Run in the foreground.
* **-0**
On start, trigger added and enabled events for each plugged devices. A
master device will trigger the "added" event while a slave device will
trigger both the "added" and the "enabled" device.* **-c** _command-prefix_
Command prefix to run. Unfortunately, currently this is passed to
[execvp(3)](http://manpages.debian.org/execvp) directly, so spaces aren't allowed. This is subject to
change in future.* **-p** _pidfile_
Write the process ID of the running daemon to the file _pidfile_
# ENVIRONMENT
* _DISPLAY_
X11 display to connect to.
# SEE ALSO
[xinput(1)](http://manpages.debian.org/xinput)
# COPYRIGHT
Copyright (C) 2013, 2014, 2018, 2020, 2021 Andrej Shadura.
Copyright (C) 2014, 2020 Vincent Bernat.
Licensed as MIT/X11.
# AUTHOR
Andrej Shadura