aboutsummaryrefslogtreecommitdiff
path: root/tmux.1
diff options
context:
space:
mode:
authornicm <nicm>2015-12-08 01:10:31 +0000
committernicm <nicm>2015-12-08 01:10:31 +0000
commitd2fb0efcd197bf0d581a0f7b1e27223d095cb339 (patch)
tree3de4e6a7451d355ff752da7ec6013ea57c95b54c /tmux.1
parentdbfce2a4d8ea0bd4773eacf154fd3e3406d1be5e (diff)
downloadrtmux-d2fb0efcd197bf0d581a0f7b1e27223d095cb339.tar.gz
rtmux-d2fb0efcd197bf0d581a0f7b1e27223d095cb339.tar.bz2
rtmux-d2fb0efcd197bf0d581a0f7b1e27223d095cb339.zip
Add hooks infrastructure, basic commands (set-hook, show-hooks) and a
couple of not very useful client hooks. This will eventually let commands be run at various points and on notifications. Joint work with Thomas Adam.
Diffstat (limited to 'tmux.1')
-rw-r--r--tmux.146
1 files changed, 46 insertions, 0 deletions
diff --git a/tmux.1 b/tmux.1
index 7d45688c..6971100e 100644
--- a/tmux.1
+++ b/tmux.1
@@ -3193,6 +3193,52 @@ is used.
.Fl v
shows only the option value, not the name.
.El
+.Sh HOOKS
+.Nm
+allows commands to run on various triggers, called
+.Em hooks .
+Each hook has a
+.Em name .
+The following hooks are available:
+.Bl -tag -width "XXXXXXXXXXXXXXXX"
+.It client-attached
+Run when a client is attached.
+.It client-detached
+Run when a client is detached
+.It client-resized
+Run when a client is resized.
+.El
+.Pp
+Hooks are managed with these commands:
+.Bl -tag -width Ds
+.It Xo Ic set-hook
+.Op Fl g
+.Op Fl t Ar target-session
+.Ar hook-name
+.Ar command
+.Xc
+Sets hook
+.Ar hook-name
+to
+.Ar command .
+If
+.Fl g
+is given,
+.Em hook-name
+is added to the global list of hooks, otherwise it is added to the session
+hooks (for
+.Ar target-session
+with
+.Fl t ) .
+Like options, session hooks inherit from the global ones.
+.It Xo Ic show-hooks
+.Op Fl g
+.Op Fl t Ar target-session
+.Xc
+Shows the global list of hooks with
+.Fl g ,
+otherwise the session hooks.
+.Ed
.Sh MOUSE SUPPORT
If the
.Ic mouse