# tmux 3.2a hooks

Source: https://libtmux.org/en/tmux/3.2a/catalog/hooks/

> Events that run tmux commands, with the scope each hook belongs to and where tmux fires it. Reference for tmux 3.2a.

Events that run tmux commands, with the scope each hook belongs to and where tmux fires it. The list covers tmux 3.2a, 61 entries.

## After a command38

[after-bind-key](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-bind-key/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-capture-pane](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-capture-pane/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-copy-mode](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-copy-mode/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-display-message](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-display-message/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-display-panes](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-display-panes/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-kill-pane](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-kill-pane/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-list-buffers](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-list-buffers/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-list-clients](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-list-clients/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-list-keys](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-list-keys/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-list-panes](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-list-panes/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-list-sessions](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-list-sessions/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-list-windows](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-list-windows/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-load-buffer](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-load-buffer/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-lock-server](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-lock-server/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-new-session](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-new-session/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-new-window](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-new-window/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-paste-buffer](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-paste-buffer/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-pipe-pane](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-pipe-pane/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-queue](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-queue/)

[after-refresh-client](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-refresh-client/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-rename-session](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-rename-session/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-rename-window](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-rename-window/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-resize-pane](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-resize-pane/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-resize-window](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-resize-window/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-save-buffer](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-save-buffer/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-select-layout](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-select-layout/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-select-pane](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-select-pane/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-select-window](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-select-window/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-send-keys](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-send-keys/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-set-buffer](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-set-buffer/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-set-environment](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-set-environment/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-set-hook](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-set-hook/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-set-option](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-set-option/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-show-environment](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-show-environment/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-show-messages](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-show-messages/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-show-options](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-show-options/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-split-window](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-split-window/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

[after-unbind-key](https://libtmux.org/en/tmux/3.2a/catalog/hooks/after-unbind-key/)

A command's after hook is run after it completes, except when the command is run as part of a hook itself.

## Window alerts3

[alert-activity](https://libtmux.org/en/tmux/3.2a/catalog/hooks/alert-activity/)

Run when a window has activity.

[alert-bell](https://libtmux.org/en/tmux/3.2a/catalog/hooks/alert-bell/)

Run when a window has received a bell.

[alert-silence](https://libtmux.org/en/tmux/3.2a/catalog/hooks/alert-silence/)

Run when a window has been silent.

## Clients4

[client-attached](https://libtmux.org/en/tmux/3.2a/catalog/hooks/client-attached/)

Run when a client is attached.

[client-detached](https://libtmux.org/en/tmux/3.2a/catalog/hooks/client-detached/)

Run when a client is detached

[client-resized](https://libtmux.org/en/tmux/3.2a/catalog/hooks/client-resized/)

Run when a client is resized.

[client-session-changed](https://libtmux.org/en/tmux/3.2a/catalog/hooks/client-session-changed/)

Run when a client's attached session is changed.

## Panes7

[pane-died](https://libtmux.org/en/tmux/3.2a/catalog/hooks/pane-died/)

Run when the program running in a pane exits, but remain-on-exit is on so the pane has not closed.

[pane-exited](https://libtmux.org/en/tmux/3.2a/catalog/hooks/pane-exited/)

Run when the program running in a pane exits.

[pane-focus-in](https://libtmux.org/en/tmux/3.2a/catalog/hooks/pane-focus-in/)

Run when the focus enters a pane, if the focus-events option is on.

[pane-focus-out](https://libtmux.org/en/tmux/3.2a/catalog/hooks/pane-focus-out/)

Run when the focus exits a pane, if the focus-events option is on.

[pane-mode-changed](https://libtmux.org/en/tmux/3.2a/catalog/hooks/pane-mode-changed/)

The pane with ID pane-id has changed mode.

[pane-set-clipboard](https://libtmux.org/en/tmux/3.2a/catalog/hooks/pane-set-clipboard/)

Run when the terminal clipboard is set using the xterm(1) escape sequence.

[pane-title-changed](https://libtmux.org/en/tmux/3.2a/catalog/hooks/pane-title-changed/)

## Sessions4

[session-closed](https://libtmux.org/en/tmux/3.2a/catalog/hooks/session-closed/)

Run when a session closed.

[session-created](https://libtmux.org/en/tmux/3.2a/catalog/hooks/session-created/)

Run when a new session created.

[session-renamed](https://libtmux.org/en/tmux/3.2a/catalog/hooks/session-renamed/)

Run when a session is renamed.

[session-window-changed](https://libtmux.org/en/tmux/3.2a/catalog/hooks/session-window-changed/)

The session with ID session-id changed its active window to the window with ID window-id.

## Windows5

[window-layout-changed](https://libtmux.org/en/tmux/3.2a/catalog/hooks/window-layout-changed/)

[window-linked](https://libtmux.org/en/tmux/3.2a/catalog/hooks/window-linked/)

Run when a window is linked into a session.

[window-pane-changed](https://libtmux.org/en/tmux/3.2a/catalog/hooks/window-pane-changed/)

The active pane in the window with ID window-id changed to the pane with ID pane-id.

[window-renamed](https://libtmux.org/en/tmux/3.2a/catalog/hooks/window-renamed/)

Run when a window is renamed.

[window-unlinked](https://libtmux.org/en/tmux/3.2a/catalog/hooks/window-unlinked/)

Run when a window is unlinked from a session.
