current, suggested by Jan ONDREJ.
-/* $OpenBSD: options-table.c,v 1.58 2015/05/11 10:58:22 nicm Exp $ */
+/* $OpenBSD: options-table.c,v 1.59 2015/05/12 15:27:46 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net>
"top", "bottom", NULL
};
const char *options_table_bell_action_list[] = {
- "none", "any", "current", NULL
+ "none", "any", "current", "other", NULL
};
/* Server options. */
-/* $OpenBSD: server-window.c,v 1.34 2015/04/24 23:17:11 nicm Exp $ */
+/* $OpenBSD: server-window.c,v 1.35 2015/05/12 15:27:46 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
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);
}
-.\" $OpenBSD: tmux.1,v 1.428 2015/05/11 10:10:16 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.429 2015/05/12 15:27:46 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 11 2015 $
+.Dd $Mdocdate: May 12 2015 $
.Dt TMUX 1
.Os
.Sh NAME
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
-/* $OpenBSD: tmux.h,v 1.512 2015/05/11 10:10:16 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.513 2015/05/12 15:27:46 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
#define BELL_NONE 0
#define BELL_ANY 1
#define BELL_CURRENT 2
+#define BELL_OTHER 3
/* Special key codes. */
#define KEYC_NONE 0xfff