mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Add monitor-bell window option to match the activity and silence
options, from Brad Town.
This commit is contained in:
8
alerts.c
8
alerts.c
@ -90,8 +90,10 @@ alerts_check_session(struct session *s)
|
||||
static int
|
||||
alerts_enabled(struct window *w, int flags)
|
||||
{
|
||||
if (flags & WINDOW_BELL)
|
||||
return (1);
|
||||
if (flags & WINDOW_BELL) {
|
||||
if (options_get_number(w->options, "monitor-bell"))
|
||||
return (1);
|
||||
}
|
||||
if (flags & WINDOW_ACTIVITY) {
|
||||
if (options_get_number(w->options, "monitor-activity"))
|
||||
return (1);
|
||||
@ -164,6 +166,8 @@ alerts_check_bell(struct window *w)
|
||||
|
||||
if (~w->flags & WINDOW_BELL)
|
||||
return (0);
|
||||
if (!options_get_number(w->options, "monitor-bell"))
|
||||
return (0);
|
||||
|
||||
TAILQ_FOREACH(wl, &w->winlinks, wentry)
|
||||
wl->session->flags &= ~SESSION_ALERTED;
|
||||
|
Reference in New Issue
Block a user