HooksMixin.show_hooks
Return a dict of hooks for the target.
Source and package
- Qualified name
-
libtmux.hooks .Hooks Mixin. show _hooks - Module
- libtmux.hooks
- Declared in
HooksMixin- Package
- libtmux
- Source
- src/libtmux/hooks.py
-
Examples#
>>> session.set_hook('session-renamed[0]', 'display-message "test"')Session($...)>>> hooks = session.show_hooks()>>> isinstance(hooks, dict)True>>> 'session-renamed[0]' in hooksTrue>>> session.unset_hook('session-renamed')Session($...)- Parameters
-
-
global_(bool | None) # – Pass-gflag for global hooks, default False. -
scope(OptionScope | _DefaultOption | None) # – Hook scope (Server/Session/Window/Pane), defaults to object's scope.Scope
-
- Returns
-
HookDict Dictionary mapping hook names to their values.
tmux command#
The tmux commands behind show_hooks.
tmux C API#
The C declarations in tmux that implement these commands.
tmux hooks#
Events that run tmux commands, with the scope each hook belongs to and where tmux fires it.