mirror of
https://github.com/tmux/tmux.git
synced 2025-09-04 06:56:58 +00:00
Add activity monitoring, also invert items on taskbar which have activity.
This commit is contained in:
19
status.c
19
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user