summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2014-04-17 07:36:45 +0000
committernicm <nicm>2014-04-17 07:36:45 +0000
commit992ef70fb696d648b3ec6ed97642fd79a8392baf (patch)
treeb37b31dd9241614b8cb558f614163e69b3403f90
parent5acee1c04ed38afd6a32da4a66e6855ccdc52af3 (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.
-rw-r--r--format.c2
-rw-r--r--options-table.c33
-rw-r--r--server-window.c55
-rw-r--r--status.c2
-rw-r--r--tmux.133
-rw-r--r--tmux.h6
-rw-r--r--window.c2
7 files changed, 8 insertions, 125 deletions
diff --git a/format.c b/format.c
index 5fc76b2b..f462a2a5 100644
--- a/format.c
+++ b/format.c
@@ -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/options-table.c b/options-table.c
index bc25573a..a46f5ce6 100644
--- a/options-table.c
+++ b/options-table.c
@@ -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/server-window.c b/server-window.c
index 86beeef4..a14c3150 100644
--- a/server-window.c
+++ b/server-window.c
@@ -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/status.c b/status.c
index 029be4c8..acbf278e 100644
--- a/status.c
+++ b/status.c
@@ -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/tmux.1 b/tmux.1
index da4efcdc..39523c99 100644
--- a/tmux.1
+++ b/tmux.1
@@ -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/tmux.h b/tmux.h
index 61fa4a39..8964ae00 100644
--- a/tmux.h
+++ b/tmux.h
@@ -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/window.c b/window.c
index bb69c0bc..d934dabb 100644
--- a/window.c
+++ b/window.c
@@ -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)