# libtmux.hooks.HooksMixin

- **Module:** libtmux.hooks
- **Package:** libtmux
- **Language:** Python
- **Kind:** class
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/hooks.py#L59
- **Page:** https://libtmux.org/reference/py/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)
