From 14b951254674c75d8422a8ac5f320a54d1dd8a48 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 4 Jun 2008 16:46:23 +0000 Subject: Add activity monitoring, also invert items on taskbar which have activity. --- status.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'status.c') 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 @@ -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; } -- cgit