sxhkd
Simple X11 hotkey daemon
TLDR
Start sxhkd with default configuration
SYNOPSIS
sxhkd [-hv] [-m count] [-t timeout] [-c configfile] [**-r** redirfile] [-s statusfifo] [configfile...]
DESCRIPTION
sxhkd (Simple X Hotkey Daemon) listens for keyboard and mouse events on X11 and executes commands defined in its configuration file. It is window manager agnostic and commonly used with tiling window managers like bspwm.
Configuration is read from ~/.config/sxhkd/sxhkdrc by default. Each binding consists of a hotkey line followed by a command line (indented with whitespace). Modifiers include super, alt, ctrl, shift, and mod1-mod5.
Key features include chorded bindings (sequences like super + a ; b), key release events (prefix keysym with @), and pointer buttons (button1-button24). Sequences with {a,b,c} expand to multiple bindings.
Commands execute via $SXHKD_SHELL or $SHELL. Send SIGUSR1 to reload configuration and SIGUSR2 to toggle hotkey grabbing.
PARAMETERS
-h
Display help and exit-v
Display version and exit-c configfile_
Read configuration from specified file instead of default-r redirfile_
Redirect command output to specified file-s statusfifo_
Write status information to specified FIFO-t timeout
Chord chain timeout in seconds-m count
Handle first count mapping notify events (for keyboard layout changes)
CONFIGURATION
~/.config/sxhkd/sxhkdrc
Default configuration file defining hotkey bindings and their associated commands.
CAVEATS
sxhkd only works on X11; it does not support Wayland. Keysym names are determined by xev. Some key combinations may conflict with window managers or other applications grabbing the same keys.
HISTORY
sxhkd was created by Bastien Dejean (baskerville), the same developer behind bspwm. It was first released around 2013 as a standalone hotkey daemon that could work with any window manager, addressing the need for a simple, scriptable keybinding system independent of the window manager.
