Hi This is a nice idea but by default the alert colour is inverted and it looks very odd and confusing in the menu.
Perhaps we should just make entries with an alert bold and not use the config options for the menu? Like this: Index: tmux.h =================================================================== RCS file: /cvs/src/usr.bin/tmux/tmux.h,v retrieving revision 1.349 diff -u -p -r1.349 tmux.h --- tmux.h 13 Jul 2012 06:27:41 -0000 1.349 +++ tmux.h 11 Aug 2012 06:12:27 -0000 @@ -848,6 +848,7 @@ struct window_mode { /* Structures for choose mode. */ struct window_choose_data { + struct winlink *wl; struct client *client; struct session *session; struct format_tree *ft; Index: window-choose.c =================================================================== RCS file: /cvs/src/usr.bin/tmux/window-choose.c,v retrieving revision 1.21 diff -u -p -r1.21 window-choose.c --- window-choose.c 10 Jul 2012 11:53:01 -0000 1.21 +++ window-choose.c 11 Aug 2012 06:12:27 -0000 @@ -135,6 +135,7 @@ window_choose_data_create(struct cmd_ctx wcd->ft = format_create(); wcd->ft_template = NULL; wcd->command = NULL; + wcd->wl = NULL; wcd->client = ctx->curclient; wcd->session = ctx->curclient->session; wcd->idx = -1; @@ -374,6 +375,9 @@ window_choose_write_line( screen_write_cursormove(ctx, 0, py); if (data->top + py < ARRAY_LENGTH(&data->list)) { item = &ARRAY_ITEM(&data->list, data->top + py); + if (item->wcd->wl != NULL && + item->wcd->wl->flags & WINLINK_ALERTFLAGS) + gc.attr |= GRID_ATTR_BRIGHT; key = window_choose_key_index(data, data->top + py); if (key != -1) { screen_write_nputs(ctx, screen_size_x(s) - 1, @@ -548,6 +552,7 @@ window_choose_add_window(struct window_p free(action_data); wcd->idx = wl->idx; + wcd->wl = wl; wcd->ft_template = xstrdup(template); format_add(wcd->ft, "line", "%u", idx); format_session(wcd->ft, s); On Sun, Jul 15, 2012 at 12:31:06PM +0100, Thomas Adam wrote: > When rendering windows in choose-mode (via choose-tree and choose-window) > render certain lines in their appropriate alert colour, if set. > --- > trunk/window-choose.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/trunk/window-choose.c b/trunk/window-choose.c > index f385763..96d13f5 100644 > --- a/trunk/window-choose.c > +++ b/trunk/window-choose.c > @@ -135,6 +135,7 @@ window_choose_data_create(struct cmd_ctx *ctx) > wcd->ft = format_create(); > wcd->ft_template = NULL; > wcd->command = NULL; > + wcd->wl = NULL; > wcd->client = ctx->curclient; > wcd->session = ctx->curclient->session; > wcd->idx = -1; > @@ -374,6 +375,7 @@ window_choose_write_line( > screen_write_cursormove(ctx, 0, py); > if (data->top + py < ARRAY_LENGTH(&data->list)) { > item = &ARRAY_ITEM(&data->list, data->top + py); > + winlink_set_alert_colours(item->wcd->wl, &gc); > key = window_choose_key_index(data, data->top + py); > if (key != -1) { > screen_write_nputs(ctx, screen_size_x(s) - 1, > @@ -548,6 +550,7 @@ window_choose_add_window(struct window_pane *wp, struct > cmd_ctx *ctx, > free(action_data); > > wcd->idx = wl->idx; > + wcd->wl = wl; > wcd->ft_template = xstrdup(template); > format_add(wcd->ft, "line", "%u", idx); > format_session(wcd->ft, s); > -- > 1.7.10 > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users