● skhd Configuration
skhd configuration uses a simple DSL stored in ~/.config/skhd/skhdrc. The file is hot-reloaded when saved.
Configuration File Location
skhd looks for configuration in this order:
$XDG_CONFIG_HOME/skhd/skhdrc~/.config/skhd/skhdrc~/.skhdrc
Specify a custom location with skhd -c /path/to/config.
Basic Syntax
# Comments start with #
# Format: modifier + key = command
alt + return = exec open -n /Applications/Terminal.app
Modifiers
alt- Option keyctrl- Control keyshift- Shift keycmd- Command keyfn- Function keylalt/ralt- Left/right Optionlctrl/rctrl- Left/right Controllshift/rshift- Left/right Shiftlcmd/rcmd- Left/right Command
Keys
return- Enter keyspace- Space barescape- Escape keytab- Tab keydelete- Delete key- Letters:
athroughz - Numbers:
0through9 - Function keys:
f1throughf35
Special Keys
up/down/left/right- Arrow keyshome/end- Home and Endpage_up/page_down- Page navigationprint- Print Screeninsert- Insert keymenu- Menu key
Action Syntax
# Direct execution
alt + a : exec command
# Command with shell
alt + b : exec /bin/bash -c "complex command"
# Multiple commands
alt + c : exec cmd1; exec cmd2
Application-Specific Syntax
# Only for specific app
alt + a [Terminal] : exec command
# Exclude specific app
alt + a [~Terminal] : exec command
# All apps
alt + a [*] : exec command
Mode Declaration
# Define mode
:: name @ : on_enter_command
:: name : on_enter_command
# Mode usage
name > key : command
Reloading Configuration
# Reload without restart
skhd --reload
# Check configuration syntax
skhd --load-config
Sample Window Management Config
# Focus windows
alt + h : yabai -m window --focus west
alt + j : yabai -m window --focus south
alt + k : yabai -m window --focus north
alt + l : yabai -m window --focus east
# Move windows
alt + shift + h : yabai -m window --warp west
alt + shift + j : yabai -m window --warp south
alt + shift + k : yabai -m window --warp north
alt + shift + l : yabai -m window --warp east
# Resize windows
alt + r : yabai -m window --toggle zoom-parent
alt + e : yabai -m window --toggle split
# Float toggle
alt + space : yabai -m window --toggle float
For yabai command reference, see the shortcuts note.
Configuration is simple and powerful, enabling everything from basic keybindings to complex automation workflows.
- Links to
- skhd · yabai
- Linked from
- skhd Advanced Features