tmux_set_hook
Set or unset a hook that runs a tmux command on events like pane-died or session-created. Optionally apply globally or remove hooks.
Instructions
Set (or unset) a hook that runs a tmux command on an event.
hook is the event name, e.g. "pane-died" or "session-created";
command is the tmux command to run (a command string like
'display "gone"'). global_=True (-g) sets it server-wide; unset=True
(-u) removes the hook instead. Requires tmux 2.2+.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hook | Yes | ||
| command | No | ||
| global_ | No | ||
| unset | No | ||
| target | No |