pind
Simple Rust hotkey daemon.
git clone https://git.pi66.xyz/pind
README.md
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |
Usage
Run:
1 | |
To restart, just run the command again (it kills the old process).
Config
The config file is located at:
1 | |
Config Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
Key Symbol Table
| Key | Symbol(s) |
|---|---|
| Ctrl Left | ctrl, ctrl_left |
| Ctrl Right | ctrl_right |
| Shift Left | shift, shift_left |
| Shift Right | shift_right |
| Alt Left | alt, alt_left |
| Alt Right | alt_right |
| Meta Left | meta, meta_left |
| Meta Right | meta_right |
| CapsLock | capslock |
| Tab | tab |
| Enter | enter, return |
| Esc | esc |
| Space | space |
| Up | up |
| Down | down |
| Left | left |
| Right | right |
| Backslash | , back_slash |
| Slash | /, slash |
| Dot | ., dot |
| Comma | ,, comma |
| Semicolon | ;, semicolon |
| Apostrophe | ', apostrophe |
| Left Brace | [, leftbrace |
| Right Brace | ], rightbrace |
| Minus | -, minus |
| Equal | =, equal |
| Grave | `, grave |
| NumLock | numlock |
| ScrollLock | scroll_lock |
| 0–9 | 0,1,2,...,9 |
| A–Z | a–z |
| F1–F12 | f1–f12 |
| KP0–KP9 | kp0–kp9, keypad_0–9 |
| KP Dot | kpdot, keypad_dot |
| KP Minus | kpminus, keypad_minus |
How it Works
There are two executables:
-
pindd: Pind Daemon Runs as root, opens
/dev/input/eventX, and listens for key presses. If the pressed keys match the config, it runs the mapped command. If the pressed keys don't match the config, it usesuinputto pass the key event to the focused client. -
pindc: Pind Client Captures the user’s environment variables and passes them to
pindd. This allows root daemon processes to still access the user environment (paths,XDG_RUNTIME_DIR, etc). ```