Hooks in tmux
From the tmux cheat sheet ยท Formats and Automation ยท verified Aug 2026
Hooks
Run a tmux command after a server event.
bash
set-hook -g session-created 'display-message "Session created"'๐ Hooks run tmux commands, not raw shell syntax
๐ก Use run-shell when a hook must call a script
๐ Multiple hooks can use indexed array options
โ ๏ธ Keep hooks fast to avoid workflow delays
hooksautomationevents
Continue with tmux
Save the full cheat sheet or work through every related task.