skhd Configuration

507 2026-08-14 note ♑︎

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:

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

Keys

Special Keys

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.