mirror of
https://github.com/tmux/tmux.git
synced 2025-01-07 16:28:48 +00:00
Add a client-active hook, from ncfavier in GitHub issue 2803.
This commit is contained in:
parent
e37aa45681
commit
42490f4750
@ -1145,6 +1145,7 @@ const struct options_table_entry options_table[] = {
|
|||||||
OPTIONS_TABLE_HOOK("alert-activity", ""),
|
OPTIONS_TABLE_HOOK("alert-activity", ""),
|
||||||
OPTIONS_TABLE_HOOK("alert-bell", ""),
|
OPTIONS_TABLE_HOOK("alert-bell", ""),
|
||||||
OPTIONS_TABLE_HOOK("alert-silence", ""),
|
OPTIONS_TABLE_HOOK("alert-silence", ""),
|
||||||
|
OPTIONS_TABLE_HOOK("client-active", ""),
|
||||||
OPTIONS_TABLE_HOOK("client-attached", ""),
|
OPTIONS_TABLE_HOOK("client-attached", ""),
|
||||||
OPTIONS_TABLE_HOOK("client-detached", ""),
|
OPTIONS_TABLE_HOOK("client-detached", ""),
|
||||||
OPTIONS_TABLE_HOOK("client-resized", ""),
|
OPTIONS_TABLE_HOOK("client-resized", ""),
|
||||||
|
@ -1127,6 +1127,8 @@ server_client_update_latest(struct client *c)
|
|||||||
|
|
||||||
if (options_get_number(w->options, "window-size") == WINDOW_SIZE_LATEST)
|
if (options_get_number(w->options, "window-size") == WINDOW_SIZE_LATEST)
|
||||||
recalculate_size(w, 0);
|
recalculate_size(w, 0);
|
||||||
|
|
||||||
|
notify_client("client-active", c);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
2
tmux.1
2
tmux.1
@ -4396,6 +4396,8 @@ See
|
|||||||
Run when a window has been silent.
|
Run when a window has been silent.
|
||||||
See
|
See
|
||||||
.Ic monitor-silence .
|
.Ic monitor-silence .
|
||||||
|
.It client-active
|
||||||
|
Run when a client becomes the latest active client of its session.
|
||||||
.It client-attached
|
.It client-attached
|
||||||
Run when a client is attached.
|
Run when a client is attached.
|
||||||
.It client-detached
|
.It client-detached
|
||||||
|
Loading…
Reference in New Issue
Block a user