Core LibrarystableAPI Reference

Choose documentation 3

stable

Current version

stable
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

method libtmux stable

HooksMixin.show_hooks

Return a dict of hooks for the target.

Source and package
Qualified name
libtmux.hooks.HooksMixin.show_hooks
Module
libtmux.hooks
Declared in
HooksMixin
Package
libtmux
Source
src/libtmux/hooks.py
show_hooks ( self, global_: bool | None = False, scope: OptionScope | _DefaultOptionScope | None = DEFAULT_OPTION_SCOPE, ) → HookDict

Examples#

>>> session.set_hook('session-renamed[0]', 'display-message "test"')
Session($...)
>>> hooks = session.show_hooks()
>>> isinstance(hooks, dict)
True
>>> 'session-renamed[0]' in hooks
True
>>> session.unset_hook('session-renamed')
Session($...)
Parameters
Returns

HookDict Dictionary mapping hook names to their values.

tmux catalog Hooks

Esc

Type to search.

Reference preview Open reference