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.

Python API

method libtmux stable

Window.show_hooks

Return a dict of hooks for the target.

Source and package
Qualified name
libtmux.Window.show_hooks
Module
libtmux
Declared in
Window
Package
libtmux
Source
src/libtmux/hooks.py
Other languages
PowerShell Julia RubyLuaTypeScript Rust GoJavaC# C++ Swift Kotlin Scala F#
show_hooks ( self, global_: bool | None = False, scope: OptionScope | _DefaultOptionScope | None = DEFAULT_OPTION_SCOPE, ) → HookDict

Inherited from libtmux.hooks.HooksMixin

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

In other ports Read a window's hooks
Esc

Type to search.

Reference preview Open reference