# libtmux.hooks.HooksMixin

- **Module:** libtmux.hooks
- **Package:** libtmux
- **Language:** Python
- **Kind:** class
- **Source:** https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/hooks.py#L59
- **Page:** https://libtmux.org/en/py/latest/reference/libtmux-hooks-hooksmixin/

Mixin for manager scoped hooks in tmux.

Requires tmux 3.1+. For older versions, use raw commands.

## Members

- `default_hook_scope` (attribute)
- `hooks` (attribute)
- `__init__` (method): When not a user (custom) hook, scope can be implied.
- `_tmux_bin` (property): Resolve tmux_bin from self (Server) or self.server (Session/Window/Pane).
- `run_hook` (method): Run a hook immediately. Useful for testing.
- `set_hook` (method): Set hook for tmux target.
- `unset_hook` (method): Unset hook for tmux target.
- `show_hooks` (method): Return a dict of hooks for the target.
- `_show_hook` (method): Return value for the hook.
- `show_hook` (method): Return value for a hook.
- `set_hooks` (method): Set multiple indexed hooks at once.
- `cmd` (attribute)
