summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2014-04-17 07:36:46 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2014-04-17 07:36:46 +0000
commit6ebe71199ee5daae4264327427d33d337d899b45 (patch)
tree2dbe93b6ed9929fa1eb076eef9b3561f25d5fc2e /usr.bin
parentc5516abf16052811d0a59586f8fb6dd5e36d6052 (diff)
Remove the monitor-content option and associated bits and bobs. It's
never worked very well. If there is a big demand for it to return, will consider better ways to do it.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/format.c4
-rw-r--r--usr.bin/tmux/options-table.c35
-rw-r--r--usr.bin/tmux/server-window.c57
-rw-r--r--usr.bin/tmux/status.c4
-rw-r--r--usr.bin/tmux/tmux.137
-rw-r--r--usr.bin/tmux/tmux.h8
-rw-r--r--usr.bin/tmux/window.c4
7 files changed, 16 insertions, 133 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c
index 58c6d817ef1..c05bef42f3c 100644
--- a/usr.bin/tmux/format.c
+++ b/usr.bin/tmux/format.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: format.c,v 1.42 2014/04/02 18:12:18 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.43 2014/04/17 07:36:45 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -487,8 +487,6 @@ format_winlink(struct format_tree *ft, struct session *s, struct winlink *wl)
format_add(ft, "window_bell_flag", "%u",
!!(wl->flags & WINLINK_BELL));
- format_add(ft, "window_content_flag", "%u",
- !!(wl->flags & WINLINK_CONTENT));
format_add(ft, "window_activity_flag", "%u",
!!(wl->flags & WINLINK_ACTIVITY));
format_add(ft, "window_silence_flag", "%u",
diff --git a/usr.bin/tmux/options-table.c b/usr.bin/tmux/options-table.c
index fe95ffb56c3..5d90c20239d 100644
--- a/usr.bin/tmux/options-table.c
+++ b/usr.bin/tmux/options-table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options-table.c,v 1.46 2014/03/31 21:41:35 nicm Exp $ */
+/* $OpenBSD: options-table.c,v 1.47 2014/04/17 07:36:45 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -491,11 +491,6 @@ const struct options_table_entry session_options_table[] = {
.default_num = 0
},
- { .name = "visual-content",
- .type = OPTIONS_TABLE_FLAG,
- .default_num = 0
- },
-
{ .name = "visual-silence",
.type = OPTIONS_TABLE_FLAG,
.default_num = 0
@@ -629,11 +624,6 @@ const struct options_table_entry window_options_table[] = {
.default_num = 0
},
- { .name = "monitor-content",
- .type = OPTIONS_TABLE_STRING,
- .default_str = ""
- },
-
{ .name = "monitor-silence",
.type = OPTIONS_TABLE_NUMBER,
.minimum = 0,
@@ -735,29 +725,6 @@ const struct options_table_entry window_options_table[] = {
.style = "window-status-style"
},
- { .name = "window-status-content-attr",
- .type = OPTIONS_TABLE_ATTRIBUTES,
- .default_num = GRID_ATTR_REVERSE,
- .style = "window-status-content-style"
- },
-
- { .name = "window-status-content-bg",
- .type = OPTIONS_TABLE_COLOUR,
- .default_num = 8,
- .style = "window-status-content-style"
- },
-
- { .name = "window-status-content-fg",
- .type = OPTIONS_TABLE_COLOUR,
- .default_num = 8,
- .style = "window-status-content-style"
- },
-
- { .name = "window-status-content-style",
- .type = OPTIONS_TABLE_STYLE,
- .default_str = "reverse"
- },
-
{ .name = "window-status-current-attr",
.type = OPTIONS_TABLE_ATTRIBUTES,
.default_num = 0,
diff --git a/usr.bin/tmux/server-window.c b/usr.bin/tmux/server-window.c
index dd6a839b79e..b9939715724 100644
--- a/usr.bin/tmux/server-window.c
+++ b/usr.bin/tmux/server-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-window.c,v 1.30 2014/04/02 17:14:24 nicm Exp $ */
+/* $OpenBSD: server-window.c,v 1.31 2014/04/17 07:36:45 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -27,19 +27,16 @@
int server_window_check_bell(struct session *, struct winlink *);
int server_window_check_activity(struct session *, struct winlink *);
int server_window_check_silence(struct session *, struct winlink *);
-int server_window_check_content(
- struct session *, struct winlink *, struct window_pane *);
void ring_bell(struct session *);
/* Window functions that need to happen every loop. */
void
server_window_loop(void)
{
- struct window *w;
- struct winlink *wl;
- struct window_pane *wp;
- struct session *s;
- u_int i;
+ struct window *w;
+ struct winlink *wl;
+ struct session *s;
+ u_int i;
for (i = 0; i < ARRAY_LENGTH(&windows); i++) {
w = ARRAY_ITEM(&windows, i);
@@ -55,8 +52,6 @@ server_window_loop(void)
server_window_check_activity(s, wl) ||
server_window_check_silence(s, wl))
server_status_session(s);
- TAILQ_FOREACH(wp, &w->panes, entry)
- server_window_check_content(s, wl, wp);
}
}
}
@@ -187,48 +182,6 @@ server_window_check_silence(struct session *s, struct winlink *wl)
return (1);
}
-/* Check for content change in window. */
-int
-server_window_check_content(
- struct session *s, struct winlink *wl, struct window_pane *wp)
-{
- struct client *c;
- struct window *w = wl->window;
- u_int i;
- char *found, *ptr;
-
- /* Activity flag must be set for new content. */
- if (s->curw->window == w)
- w->flags &= ~WINDOW_ACTIVITY;
-
- if (!(w->flags & WINDOW_ACTIVITY) || wl->flags & WINLINK_CONTENT)
- return (0);
- if (s->curw == wl && !(s->flags & SESSION_UNATTACHED))
- return (0);
-
- ptr = options_get_string(&w->options, "monitor-content");
- if (ptr == NULL || *ptr == '\0')
- return (0);
- if ((found = window_pane_search(wp, ptr, NULL)) == NULL)
- return (0);
- free(found);
-
- if (options_get_number(&s->options, "bell-on-alert"))
- ring_bell(s);
- wl->flags |= WINLINK_CONTENT;
-
- if (options_get_number(&s->options, "visual-content")) {
- for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
- c = ARRAY_ITEM(&clients, i);
- if (c == NULL || c->session != s)
- continue;
- status_message_set(c, "Content in window %u", wl->idx);
- }
- }
-
- return (1);
-}
-
/* Ring terminal bell. */
void
ring_bell(struct session *s)
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c
index 9ca0a089994..2d6b7a90597 100644
--- a/usr.bin/tmux/status.c
+++ b/usr.bin/tmux/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.112 2014/04/02 17:08:23 nicm Exp $ */
+/* $OpenBSD: status.c,v 1.113 2014/04/17 07:36:45 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -638,8 +638,6 @@ status_print(
if (wl->flags & WINLINK_BELL)
style_apply_update(gc, oo, "window-status-bell-style");
- else if (wl->flags & WINLINK_CONTENT)
- style_apply_update(gc, oo, "window-status-content-style");
else if (wl->flags & (WINLINK_ACTIVITY|WINLINK_SILENCE))
style_apply_update(gc, oo, "window-status-activity-style");
diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1
index abb832fa215..ce4109d2d5f 100644
--- a/usr.bin/tmux/tmux.1
+++ b/usr.bin/tmux/tmux.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tmux.1,v 1.387 2014/04/16 21:02:41 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.388 2014/04/17 07:36:45 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
@@ -14,7 +14,7 @@
.\" 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: April 16 2014 $
+.Dd $Mdocdate: April 17 2014 $
.Dt TMUX 1
.Os
.Sh NAME
@@ -2644,15 +2644,6 @@ through to the terminal (which normally makes a sound).
Also see the
.Ic bell-action
option.
-.It Xo Ic visual-content
-.Op Ic on | off
-.Xc
-Like
-.Ic visual-activity ,
-display a message when content is present in a window
-for which the
-.Ic monitor-content
-window option is enabled.
.It Xo Ic visual-silence
.Op Ic on | off
.Xc
@@ -2834,14 +2825,6 @@ option.
Monitor for activity in the window.
Windows with activity are highlighted in the status line.
.Pp
-.It Ic monitor-content Ar match-string
-Monitor content in the window.
-When
-.Xr fnmatch 3
-pattern
-.Ar match-string
-appears in the window, it is highlighted in the status line.
-.Pp
.It Xo Ic monitor-silence
.Op Ic interval
.Xc
@@ -2914,14 +2897,6 @@ see the
.Ic message-command-style
option.
.Pp
-.It Ic window-status-content-style Ar style
-Set status line style for windows with a content alert.
-For how to specify
-.Ar style ,
-see the
-.Ic message-command-style
-option.
-.Pp
.It Ic window-status-current-format Ar string
Like
.Ar window-status-format ,
@@ -3124,7 +3099,6 @@ The following variables are available, where appropriate:
.It Li "window_active" Ta "" Ta "1 if window active"
.It Li "window_activity_flag" Ta "" Ta "1 if window has activity alert"
.It Li "window_bell_flag" Ta "" Ta "1 if window has bell"
-.It Li "window_content_flag" Ta "" Ta "1 if window has content alert"
.It Li "window_find_matches" Ta "" Ta "Matched data from the find-window"
.It Li "window_flags" Ta "#F" Ta "Window flags"
.It Li "window_height" Ta "" Ta "Height of window"
@@ -3286,18 +3260,15 @@ The flag is one of the following symbols appended to the window name:
.It Li "-" Ta "Marks the last window (previously selected)."
.It Li "#" Ta "Window is monitored and activity has been detected."
.It Li "!" Ta "A bell has occurred in the window."
-.It Li "+" Ta "Window is monitored for content and it has appeared."
.It Li "~" Ta "The window has been silent for the monitor-silence interval."
.It Li "Z" Ta "The window's active pane is zoomed."
.El
.Pp
The # symbol relates to the
.Ic monitor-activity
-and + to the
-.Ic monitor-content
-window options.
+window option.
The window name is printed in inverted colours if an alert (bell, activity or
-content) is present.
+silence) is present.
.Pp
The colour and attributes of the status line may be configured, the entire
status line using the
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index e0453ba64c6..e58e161ec78 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.450 2014/04/16 21:16:19 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.451 2014/04/17 07:36:45 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -990,10 +990,8 @@ struct winlink {
int flags;
#define WINLINK_BELL 0x1
#define WINLINK_ACTIVITY 0x2
-#define WINLINK_CONTENT 0x4
-#define WINLINK_SILENCE 0x8
-#define WINLINK_ALERTFLAGS \
- (WINLINK_BELL|WINLINK_ACTIVITY|WINLINK_CONTENT|WINLINK_SILENCE)
+#define WINLINK_SILENCE 0x4
+#define WINLINK_ALERTFLAGS (WINLINK_BELL|WINLINK_ACTIVITY|WINLINK_SILENCE)
RB_ENTRY(winlink) entry;
TAILQ_ENTRY(winlink) sentry;
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c
index 2892acb9fd6..cf1d176fd26 100644
--- a/usr.bin/tmux/window.c
+++ b/usr.bin/tmux/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.103 2014/03/31 21:41:07 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.104 2014/04/17 07:36:45 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -699,8 +699,6 @@ window_printable_flags(struct session *s, struct winlink *wl)
flags[pos++] = '#';
if (wl->flags & WINLINK_BELL)
flags[pos++] = '!';
- if (wl->flags & WINLINK_CONTENT)
- flags[pos++] = '+';
if (wl->flags & WINLINK_SILENCE)
flags[pos++] = '~';
if (wl == s->curw)