diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-11-27 13:52:24 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-11-27 13:52:24 +0000 |
commit | 1533e93900f0e5d84a4eb84f45a6215b09a9f3f6 (patch) | |
tree | 4697e81721dc63d3c8d124349cbaa028754935c8 /usr.bin | |
parent | 53ce36e7f75330eab0be00d981db6a9ab59ef5e0 (diff) |
Add window-status-last-* options, from Boris Faure.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/options-table.c | 17 | ||||
-rw-r--r-- | usr.bin/tmux/status.c | 13 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.1 | 13 |
3 files changed, 39 insertions, 4 deletions
diff --git a/usr.bin/tmux/options-table.c b/usr.bin/tmux/options-table.c index 79a3ad60279..f69dda07a06 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.29 2012/04/29 17:20:01 nicm Exp $ */ +/* $OpenBSD: options-table.c,v 1.30 2012/11/27 13:52:23 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net> @@ -686,6 +686,21 @@ const struct options_table_entry window_options_table[] = { .default_str = "#I:#W#F" }, + { .name = "window-status-last-attr", + .type = OPTIONS_TABLE_ATTRIBUTES, + .default_num = 0 + }, + + { .name = "window-status-last-bg", + .type = OPTIONS_TABLE_COLOUR, + .default_num = 8 + }, + + { .name = "window-status-last-fg", + .type = OPTIONS_TABLE_COLOUR, + .default_num = 8 + }, + { .name = "window-status-fg", .type = OPTIONS_TABLE_COLOUR, .default_num = 8 diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c index 820ec58cda0..441bf35dda8 100644 --- a/usr.bin/tmux/status.c +++ b/usr.bin/tmux/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.94 2012/07/10 11:53:01 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.95 2012/11/27 13:52:23 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -705,6 +705,17 @@ status_print( gc->attr = attr; fmt = options_get_string(oo, "window-status-current-format"); } + if (wl == TAILQ_FIRST(&s->lastw)) { + fg = options_get_number(oo, "window-status-last-fg"); + if (fg != 8) + colour_set_fg(gc, fg); + bg = options_get_number(oo, "window-status-last-bg"); + if (bg != 8) + colour_set_bg(gc, bg); + attr = options_get_number(oo, "window-status-last-attr"); + if (attr != 0) + gc->attr = attr; + } if (wl->flags & WINLINK_BELL) { fg = options_get_number(oo, "window-status-bell-fg"); diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index 3922a395e08..28e21467737 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.306 2012/11/19 10:50:24 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.307 2012/11/27 13:52:23 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: November 19 2012 $ +.Dd $Mdocdate: November 27 2012 $ .Dt TMUX 1 .Os .Sh NAME @@ -2823,6 +2823,15 @@ Like .Ar window-status-format , but is the format used when the window is the current window. .Pp +.It Ic window-status-last-attr Ar attributes +Set status line attributes for the last active window. +.Pp +.It Ic window-status-last-bg Ar colour +Set status line background colour for the last active window. +.Pp +.It Ic window-status-last-fg Ar colour +Set status line foreground colour for the last active window. +.Pp .It Ic window-status-fg Ar colour Set status line foreground colour for a single window. .Pp |