Add activity monitoring, also invert items on taskbar which have activity.

This commit is contained in:
Nicholas Marriott
2008-06-04 16:46:23 +00:00
parent f7ba4dfdc9
commit 14b9512546
7 changed files with 95 additions and 51 deletions

View File

@ -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;
}