Hooks
The tmux hooks at one scope.
Source and package
- Qualified name
-
io.github .libtmux. Hooks - Package
- io.github.libtmux
- Distribution
- io.github.libtmux:libtmux
- Source
- libtmux/src/main/java/io/github/libtmux/Hooks.java
-
Description#
A hook binds a tmux command to an event, so tmux runs it without a client asking.
Every hook is an array: several commands can hang off one event, and tmux runs them in order. That is why a listing answers with a list per event rather than a value — a hook set once is a list of one, not a special case.
Each hook lives at a particular scope, and not every hook lives at every one.
pane-focus-inis a window hook,alert-bella session hook. Setting one at a scope it does not belong to is accepted and then silently discarded, on every supported release — so a hook that never fires is worth checking against#all()before it is worth debugging.
Members9#
- all method Every hook at this scope, keyed by event, each with its commands in the order tmux runs them.
- append method As
String), with the command as words. - global method
- pane method
- run method Runs what is bound to an event now, without waiting for the event.
- session method
- set method Binds a tmux command to an event at this scope, replacing anything already bound to it.
- unset method Removes everything bound to an event at this scope.
- window method
tmux hooks#
Events that run tmux commands, with the scope each hook belongs to and where tmux fires it.
Guides#
Pages that discuss Hooks.