aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd-set-window-option.c5
-rw-r--r--status.c14
-rw-r--r--tmux.18
-rw-r--r--tmux.c5
4 files changed, 27 insertions, 5 deletions
diff --git a/cmd-set-window-option.c b/cmd-set-window-option.c
index 1ea8f971..f287bc4d 100644
--- a/cmd-set-window-option.c
+++ b/cmd-set-window-option.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-set-window-option.c,v 1.33 2009-07-15 17:44:47 nicm Exp $ */
+/* $Id: cmd-set-window-option.c,v 1.34 2009-07-20 15:57:05 tcunha Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -68,6 +68,9 @@ const struct set_option_entry set_window_option_table[] = {
{ "utf8", SET_OPTION_FLAG, 0, 0, NULL },
{ "window-status-attr", SET_OPTION_ATTRIBUTES, 0, 0, NULL },
{ "window-status-bg", SET_OPTION_COLOUR, 0, 0, NULL },
+ { "window-status-current-attr", SET_OPTION_ATTRIBUTES, 0, 0, NULL },
+ { "window-status-current-bg", SET_OPTION_COLOUR, 0, 0, NULL },
+ { "window-status-current-fg", SET_OPTION_COLOUR, 0, 0, NULL },
{ "window-status-fg", SET_OPTION_COLOUR, 0, 0, NULL },
{ "xterm-keys", SET_OPTION_FLAG, 0, 0, NULL },
{ NULL, 0, 0, 0, NULL }
diff --git a/status.c b/status.c
index 1b8e5a0b..596d2f0c 100644
--- a/status.c
+++ b/status.c
@@ -1,4 +1,4 @@
-/* $Id: status.c,v 1.98 2009-07-17 18:32:54 tcunha Exp $ */
+/* $Id: status.c,v 1.99 2009-07-20 15:57:05 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -460,8 +460,18 @@ status_print(struct session *s, struct winlink *wl, struct grid_cell *gc)
flag = ' ';
if (wl == SLIST_FIRST(&s->lastw))
flag = '-';
- if (wl == s->curw)
+ if (wl == s->curw) {
+ fg = options_get_number(&wl->window->options, "window-status-current-fg");
+ if (fg != 8)
+ gc->fg = fg;
+ bg = options_get_number(&wl->window->options, "window-status-current-bg");
+ if (bg != 8)
+ gc->bg = bg;
+ attr = options_get_number(&wl->window->options, "window-status-current-attr");
+ if (attr != 0)
+ gc->attr = attr;
flag = '*';
+ }
if (session_alert_has(s, wl, WINDOW_ACTIVITY)) {
flag = '#';
diff --git a/tmux.1 b/tmux.1
index 2b71db96..7d3b7bec 100644
--- a/tmux.1
+++ b/tmux.1
@@ -1,4 +1,4 @@
-.\" $Id: tmux.1,v 1.125 2009-07-20 15:46:55 tcunha Exp $
+.\" $Id: tmux.1,v 1.126 2009-07-20 15:57:05 tcunha Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
@@ -1489,6 +1489,12 @@ Set status line attributes for a single window.
Set status line background colour for a single window.
.It Ic window-status-fg Ar colour
Set status line foreground colour for a single window.
+.It Ic window-status-current-attr Ar attributes
+Set status line attributes for the currently active window.
+.It Ic window-status-current-bg Ar colour
+Set status line background colour for the currently active window.
+.It Ic window-status-current-fg Ar colour
+Set status line foreground colour for the currently active window.
.It Xo Ic xterm-keys
.Op Ic on | Ic off
.Xc
diff --git a/tmux.c b/tmux.c
index 048f5b65..66b87516 100644
--- a/tmux.c
+++ b/tmux.c
@@ -1,4 +1,4 @@
-/* $Id: tmux.c,v 1.144 2009-07-19 14:35:56 tcunha Exp $ */
+/* $Id: tmux.c,v 1.145 2009-07-20 15:57:05 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -347,6 +347,9 @@ main(int argc, char **argv)
options_set_number(&global_w_options, "window-status-attr", 0);
options_set_number(&global_w_options, "window-status-bg", 8);
options_set_number(&global_w_options, "window-status-fg", 8);
+ options_set_number(&global_w_options, "window-status-current-attr", 0);
+ options_set_number(&global_w_options, "window-status-current-bg", 8);
+ options_set_number(&global_w_options, "window-status-current-fg", 8);
options_set_number(&global_w_options, "xterm-keys", 0);
options_set_number(&global_w_options, "remain-on-exit", 0);