summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-07-20 09:15:19 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-07-20 09:15:19 +0000
commit281ace9111ced0f82d23c56782989c9361bbcf1a (patch)
tree16a5cbc4d333677bbe73e245aeabd1829f16bd2b /usr.bin/tmux/status.c
parent52b361f09e9f4b600890624ab0f0219cd5873396 (diff)
New options, window-status-current-{fg,bg,attr}, to set the fg, bg and
attributes with which the current window is shown in the status line. From Johan Friis, thanks.
Diffstat (limited to 'usr.bin/tmux/status.c')
-rw-r--r--usr.bin/tmux/status.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c
index 166748aad3a..57b9d0578a6 100644
--- a/usr.bin/tmux/status.c
+++ b/usr.bin/tmux/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.13 2009/07/17 18:45:08 nicm Exp $ */
+/* $OpenBSD: status.c,v 1.14 2009/07/20 09:15:18 nicm 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 = '#';