aboutsummaryrefslogtreecommitdiff
path: root/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-06-04 16:46:23 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-06-04 16:46:23 +0000
commit14b951254674c75d8422a8ac5f320a54d1dd8a48 (patch)
treee361a5b014694cb4b609f6c05cd54ce250cf669d /status.c
parentf7ba4dfdc91eb3121ca070a0706d0ec2dfe502e1 (diff)
downloadrtmux-14b951254674c75d8422a8ac5f320a54d1dd8a48.tar.gz
rtmux-14b951254674c75d8422a8ac5f320a54d1dd8a48.tar.bz2
rtmux-14b951254674c75d8422a8ac5f320a54d1dd8a48.zip
Add activity monitoring, also invert items on taskbar which have activity.
Diffstat (limited to 'status.c')
-rw-r--r--status.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/status.c b/status.c
index 18f5b6a1..4b934382 100644
--- a/status.c
+++ b/status.c
@@ -1,4 +1,4 @@
-/* $Id: status.c,v 1.20 2008-06-04 05:40:35 nicm Exp $ */
+/* $Id: status.c,v 1.21 2008-06-04 16:46:23 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -65,11 +65,22 @@ status_write_client(struct client *c)
flag = '-';
if (wl == c->session->curw)
flag = '*';
- if (session_hasbell(c->session, wl))
+ if (session_alert_has(c->session, wl, WINDOW_ACTIVITY)) {
+ flag = '#';
+ screen_redraw_set_attributes(
+ &ctx, ATTR_REVERSE, scolour);
+ }
+ if (session_alert_has(c->session, wl, WINDOW_BELL)) {
flag = '!';
+ screen_redraw_set_attributes(
+ &ctx, ATTR_REVERSE, scolour);
+ }
screen_redraw_write_string(
- &ctx, "%d:%s%c ", wl->idx, wl->window->name, flag);
-
+ &ctx, "%d:%s%c", wl->idx, wl->window->name, flag);
+ if (flag == '!' || flag == '#')
+ screen_redraw_set_attributes(&ctx, 0, scolour);
+ screen_redraw_write_string(&ctx, " ");
+
if (ctx.s->cx > screen_size_x(ctx.s) - rlen)
break;
}