https://github.com/cdown/xinput-toggle
A simple xinput toggler for X11 systems
https://github.com/cdown/xinput-toggle
Last synced: 4 months ago
JSON representation
A simple xinput toggler for X11 systems
- Host: GitHub
- URL: https://github.com/cdown/xinput-toggle
- Owner: cdown
- License: other
- Created: 2016-10-21T00:57:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-06-04T15:27:04.000Z (about 2 years ago)
- Last Synced: 2025-05-05T21:50:41.764Z (about 1 year ago)
- Language: Shell
- Homepage:
- Size: 9.77 KB
- Stars: 17
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
xinput-toggle is a simple script to toggle devices on and off for X11 systems.
It was created to toggle Yubikey state, but it can deal with any X input
device.
## Usage
`xinput-toggle -h` contains detailed usage information.
I suggest you bind xinput-toggle to a keybinding in your window manager if you
will use it a lot.
For these examples I will show this being used to enable/disable a Yubikey
(`-r` is a case-insensitive regex used to identify devices by names, as shown
by `xinput list`).
```
# Toggle device status (on -> off, off -> on)
xinput-toggle -r yubikey
# Show notification indicating actions performed
xinput-toggle -r yubikey -n
# Disable xinput (no toggle)
xinput-toggle -r yubikey -d
# Enable xinput (no toggle)
xinput-toggle -r yubikey -e
# Enable for 5 seconds, then disable again
xinput-toggle -r yubikey -e -t 5
```
## Requirements
- xinput
- bash 4+
- notify-send (optional, for `-n`, provided with libnotify)