mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
This commit is contained in:
		
							
								
								
									
										8
									
								
								alerts.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								alerts.c
									
									
									
									
									
								
							@@ -90,8 +90,10 @@ alerts_check_session(struct session *s)
 | 
				
			|||||||
static int
 | 
					static int
 | 
				
			||||||
alerts_enabled(struct window *w, int flags)
 | 
					alerts_enabled(struct window *w, int flags)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if (flags & WINDOW_BELL)
 | 
						if (flags & WINDOW_BELL) {
 | 
				
			||||||
		return (1);
 | 
							if (options_get_number(w->options, "monitor-bell"))
 | 
				
			||||||
 | 
								return (1);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	if (flags & WINDOW_ACTIVITY) {
 | 
						if (flags & WINDOW_ACTIVITY) {
 | 
				
			||||||
		if (options_get_number(w->options, "monitor-activity"))
 | 
							if (options_get_number(w->options, "monitor-activity"))
 | 
				
			||||||
			return (1);
 | 
								return (1);
 | 
				
			||||||
@@ -164,6 +166,8 @@ alerts_check_bell(struct window *w)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if (~w->flags & WINDOW_BELL)
 | 
						if (~w->flags & WINDOW_BELL)
 | 
				
			||||||
		return (0);
 | 
							return (0);
 | 
				
			||||||
 | 
						if (!options_get_number(w->options, "monitor-bell"))
 | 
				
			||||||
 | 
							return (0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	TAILQ_FOREACH(wl, &w->winlinks, wentry)
 | 
						TAILQ_FOREACH(wl, &w->winlinks, wentry)
 | 
				
			||||||
		wl->session->flags &= ~SESSION_ALERTED;
 | 
							wl->session->flags &= ~SESSION_ALERTED;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -654,6 +654,12 @@ const struct options_table_entry options_table[] = {
 | 
				
			|||||||
	  .default_num = 0
 | 
						  .default_num = 0
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						{ .name = "monitor-bell",
 | 
				
			||||||
 | 
						  .type = OPTIONS_TABLE_FLAG,
 | 
				
			||||||
 | 
						  .scope = OPTIONS_TABLE_WINDOW,
 | 
				
			||||||
 | 
						  .default_num = 1
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	{ .name = "monitor-silence",
 | 
						{ .name = "monitor-silence",
 | 
				
			||||||
	  .type = OPTIONS_TABLE_NUMBER,
 | 
						  .type = OPTIONS_TABLE_NUMBER,
 | 
				
			||||||
	  .scope = OPTIONS_TABLE_WINDOW,
 | 
						  .scope = OPTIONS_TABLE_WINDOW,
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										20
									
								
								tmux.1
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								tmux.1
									
									
									
									
									
								
							@@ -2567,7 +2567,9 @@ The default is zero.
 | 
				
			|||||||
.It Xo Ic bell-action
 | 
					.It Xo Ic bell-action
 | 
				
			||||||
.Op Ic any | none | current | other
 | 
					.Op Ic any | none | current | other
 | 
				
			||||||
.Xc
 | 
					.Xc
 | 
				
			||||||
Set action on window bell.
 | 
					Set action on a bell in a window when
 | 
				
			||||||
 | 
					.Ic monitor-bell
 | 
				
			||||||
 | 
					is on.
 | 
				
			||||||
The values are the same as those for
 | 
					The values are the same as those for
 | 
				
			||||||
.Ic activity-action .
 | 
					.Ic activity-action .
 | 
				
			||||||
.It Ic default-command Ar shell-command
 | 
					.It Ic default-command Ar shell-command
 | 
				
			||||||
@@ -2928,7 +2930,9 @@ If set to both, a bell and a message are produced.
 | 
				
			|||||||
.It Xo Ic visual-bell
 | 
					.It Xo Ic visual-bell
 | 
				
			||||||
.Op Ic on | off | both
 | 
					.Op Ic on | off | both
 | 
				
			||||||
.Xc
 | 
					.Xc
 | 
				
			||||||
If on, a message is shown on a bell instead of it being passed through to the
 | 
					If on, a message is shown on a bell in a window for which the
 | 
				
			||||||
 | 
					.Ic monitor-bell
 | 
				
			||||||
 | 
					window option is enabled instead of it being passed through to the
 | 
				
			||||||
terminal (which normally makes a sound).
 | 
					terminal (which normally makes a sound).
 | 
				
			||||||
If set to both, a bell and a message are produced.
 | 
					If set to both, a bell and a message are produced.
 | 
				
			||||||
Also see the
 | 
					Also see the
 | 
				
			||||||
@@ -3086,6 +3090,12 @@ option.
 | 
				
			|||||||
Monitor for activity in the window.
 | 
					Monitor for activity in the window.
 | 
				
			||||||
Windows with activity are highlighted in the status line.
 | 
					Windows with activity are highlighted in the status line.
 | 
				
			||||||
.Pp
 | 
					.Pp
 | 
				
			||||||
 | 
					.It Xo Ic monitor-bell
 | 
				
			||||||
 | 
					.Op Ic on | off
 | 
				
			||||||
 | 
					.Xc
 | 
				
			||||||
 | 
					Monitor for a bell in the window.
 | 
				
			||||||
 | 
					Windows with a bell are highlighted in the status line.
 | 
				
			||||||
 | 
					.Pp
 | 
				
			||||||
.It Xo Ic monitor-silence
 | 
					.It Xo Ic monitor-silence
 | 
				
			||||||
.Op Ic interval
 | 
					.Op Ic interval
 | 
				
			||||||
.Xc
 | 
					.Xc
 | 
				
			||||||
@@ -3319,6 +3329,8 @@ See
 | 
				
			|||||||
.Ic monitor-activity .
 | 
					.Ic monitor-activity .
 | 
				
			||||||
.It alert-bell
 | 
					.It alert-bell
 | 
				
			||||||
Run when a window has received a bell.
 | 
					Run when a window has received a bell.
 | 
				
			||||||
 | 
					See
 | 
				
			||||||
 | 
					.Ic monitor-bell .
 | 
				
			||||||
.It alert-silence
 | 
					.It alert-silence
 | 
				
			||||||
Run when a window has been silent.
 | 
					Run when a window has been silent.
 | 
				
			||||||
See
 | 
					See
 | 
				
			||||||
@@ -3851,8 +3863,8 @@ The flag is one of the following symbols appended to the window name:
 | 
				
			|||||||
.It Sy "Symbol" Ta Sy "Meaning"
 | 
					.It Sy "Symbol" Ta Sy "Meaning"
 | 
				
			||||||
.It Li "*" Ta "Denotes the current window."
 | 
					.It Li "*" Ta "Denotes the current window."
 | 
				
			||||||
.It Li "-" Ta "Marks the last window (previously selected)."
 | 
					.It Li "-" Ta "Marks the last window (previously selected)."
 | 
				
			||||||
.It Li "#" Ta "Window is monitored and activity has been detected."
 | 
					.It Li "#" Ta "Window activity is monitored and activity has been detected."
 | 
				
			||||||
.It Li "\&!" Ta "A bell has occurred in the window."
 | 
					.It Li "\&!" Ta "Window bells are monitored and a bell has occurred in the window."
 | 
				
			||||||
.It Li "~" Ta "The window has been silent for the monitor-silence interval."
 | 
					.It Li "~" Ta "The window has been silent for the monitor-silence interval."
 | 
				
			||||||
.It Li "M" Ta "The window contains the marked pane."
 | 
					.It Li "M" Ta "The window contains the marked pane."
 | 
				
			||||||
.It Li "Z" Ta "The window's active pane is zoomed."
 | 
					.It Li "Z" Ta "The window's active pane is zoomed."
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user