aboutsummaryrefslogtreecommitdiff
path: root/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-07-20 09:15:18 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-07-20 09:15:18 +0000
commite32e0d569294ca7162f197cc7c369cd57050b193 (patch)
tree809904a7a07925d9e8400f6ec0ad0846ad597297 /status.c
parent73732ffa0585faacb53b6f7bb9f741c54251dd6d (diff)
downloadrtmux-e32e0d569294ca7162f197cc7c369cd57050b193.tar.gz
rtmux-e32e0d569294ca7162f197cc7c369cd57050b193.tar.bz2
rtmux-e32e0d569294ca7162f197cc7c369cd57050b193.zip
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 'status.c')
-rw-r--r--status.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/status.c b/status.c
index c5190b54..61f5e22c 100644
--- a/status.c
+++ b/status.c
@@ -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 = '#';