mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-22 08:03:54 +01:00
Add bell-action "other" to pass through bells in all windows except the
current, suggested by Jan ONDREJ.
This commit is contained in:
parent
b833fabeb2
commit
e958db09a7
@ -49,7 +49,7 @@ const char *options_table_status_position_list[] = {
|
||||
"top", "bottom", NULL
|
||||
};
|
||||
const char *options_table_bell_action_list[] = {
|
||||
"none", "any", "current", NULL
|
||||
"none", "any", "current", "other", NULL
|
||||
};
|
||||
|
||||
/* Server options. */
|
||||
|
@ -77,13 +77,18 @@ server_window_check_bell(struct session *s, struct winlink *wl)
|
||||
if (c->session != s || c->flags & CLIENT_CONTROL)
|
||||
continue;
|
||||
if (!visual) {
|
||||
if (c->session->curw->window == w || action == BELL_ANY)
|
||||
if ((action == BELL_CURRENT &&
|
||||
c->session->curw->window == w) ||
|
||||
(action == BELL_OTHER &&
|
||||
c->session->curw->window != w) ||
|
||||
action == BELL_ANY)
|
||||
tty_bell(&c->tty);
|
||||
continue;
|
||||
}
|
||||
if (c->session->curw->window == w)
|
||||
if (action == BELL_CURRENT && c->session->curw->window == w)
|
||||
status_message_set(c, "Bell in current window");
|
||||
else if (action == BELL_ANY)
|
||||
else if (action == BELL_ANY || (action == BELL_OTHER &&
|
||||
c->session->curw->window != w))
|
||||
status_message_set(c, "Bell in window %d", wl->idx);
|
||||
}
|
||||
|
||||
|
8
tmux.1
8
tmux.1
@ -2375,16 +2375,18 @@ Set the base index from which an unused index should be searched when a new
|
||||
window is created.
|
||||
The default is zero.
|
||||
.It Xo Ic bell-action
|
||||
.Op Ic any | none | current
|
||||
.Op Ic any | none | current | other
|
||||
.Xc
|
||||
Set action on window bell.
|
||||
.Ic any
|
||||
means a bell in any window linked to a session causes a bell in the current
|
||||
window of that session,
|
||||
.Ic none
|
||||
means all bells are ignored and
|
||||
means all bells are ignored,
|
||||
.Ic current
|
||||
means only bells in windows other than the current window are ignored.
|
||||
means only bells in windows other than the current window are ignored and
|
||||
.Ic other
|
||||
means bells in the current window are ignored but not those in other windows.
|
||||
.It Xo Ic bell-on-alert
|
||||
.Op Ic on | off
|
||||
.Xc
|
||||
|
Loading…
Reference in New Issue
Block a user