Where Is the sxhkd Config File?
sxhkd reads all keybindings from ~/.config/sxhkd/sxhkdrc, one hotkey per stanza with shell commands beneath, reloaded with pkill -USR1.
Last updated
sxhkd does one thing: it reads ~/.config/sxhkd/sxhkdrc and turns key presses into shell commands. Each stanza names a hotkey first, then the command lines beneath it. No GUI, no dconf, no registry.
The file pairs naturally with window managers like bspwm that outsource all hotkeys to sxhkd. Backing up means copying one file. Sharing setups means publishing one file. Reloading takes a signal instead of a restart, which keeps iteration fast.
Where sxhkd stores this, by platform
~/.config/sxhkd/sxhkdrc
The entire sxhkd configuration in one file. Create ~/.config/sxhkd first on fresh installs. Reload with pkill -USR1 after edits.
Frequently asked questions
How do I reload sxhkd config?
Edit ~/.config/sxhkd/sxhkdrc and send pkill -USR1 sxhkd to reload without restarting X. Syntax errors print to the terminal sxhkd runs in, so launch it once in foreground when debugging. Bspwm users keep this file beside bspwmrc.
What is the sxhkdrc syntax?
Use braces for variants like super + {1-9} with matching command lists, and semicolons for chords like super + shift ; q. The man page documents the full grammar with examples. Comments start with # like shell scripts.
Notice an outdated path? Let us know.