Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ltratt/hk
hk: Set temporary X11 hotkeys
https://github.com/ltratt/hk
Last synced: about 2 months ago
JSON representation
hk: Set temporary X11 hotkeys
- Host: GitHub
- URL: https://github.com/ltratt/hk
- Owner: ltratt
- License: other
- Created: 2021-12-11T21:18:58.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-07T07:34:52.000Z (4 months ago)
- Last Synced: 2024-10-11T02:47:48.612Z (3 months ago)
- Language: C
- Homepage: https://tratt.net/laurie/src/hk/
- Size: 45.9 KB
- Stars: 21
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# hk: Set temporary X11 hotkeys
## Overview
`hk` allows temporary X11 hotkeys to be set. Its usage is:
```sh
hk [-w] [ ...]
```where `` is of the form `[Modifier1[+Modifier2[+...]]+]`. For example:
```sh
hk Ctrl+Shift+F6 notify-send "Hello"
```will execute the command `notify-send "Hello`" when `Ctrl+Shift+F6` is pressed.
`hk` exits as soon as the command has executed.`hk` passes through stdin unchanged so you can pipe input to commands e.g.:
```sh
uname | hk Ctrl+F8 xargs notify-send
```By default, `hk` executes the command as soon as the hotkey sequence is
pressed. The `-w` option makes `hk` wait until all keys (not just the hotkeys)
have been released. This can be useful if the action of the command can be
effected by key presses. For example if you use `xdotool type` to enter text on
a hotkey, then having the `Ctrl` key held down can have surprising effects
which `-w` can alleviate:```sh
uname | hk -w Ctrl+F8 xdotool type --file -
```## Install
```sh
$ autoconf
$ ./configure
$ make install
```