version 1.5, 2009/07/26 12:58:44 |
version 1.6, 2009/08/04 14:28:23 |
|
|
struct winlink *wl, *wm; |
struct winlink *wl, *wm; |
struct window *w; |
struct window *w; |
u_int idx, cur; |
u_int idx, cur; |
|
char flag, *title; |
|
const char *left, *right; |
|
|
if (ctx->curclient == NULL) { |
if (ctx->curclient == NULL) { |
ctx->error(ctx, "must be run interactively"); |
ctx->error(ctx, "must be run interactively"); |
|
|
cur = idx; |
cur = idx; |
idx++; |
idx++; |
|
|
|
flag = ' '; |
|
if (session_alert_has(s, wm, WINDOW_ACTIVITY)) |
|
flag = '#'; |
|
else if (session_alert_has(s, wm, WINDOW_BELL)) |
|
flag = '!'; |
|
else if (session_alert_has(s, wm, WINDOW_CONTENT)) |
|
flag = '+'; |
|
else if (wm == s->curw) |
|
flag = '*'; |
|
else if (wm == SLIST_FIRST(&s->lastw)) |
|
flag = '-'; |
|
|
|
title = w->active->screen->title; |
|
if (wm == wl) |
|
title = w->active->base.title; |
|
left = " \""; |
|
right = "\""; |
|
if (*title == '\0') |
|
left = right = ""; |
|
|
window_choose_add(wl->window->active, |
window_choose_add(wl->window->active, |
wm->idx, "%3d: %s [%ux%u] (%u panes)", |
wm->idx, "%3d: %s%c [%ux%u] (%u panes)%s%s%s", |
wm->idx, w->name, w->sx, w->sy, window_count_panes(w)); |
wm->idx, w->name, flag, w->sx, w->sy, window_count_panes(w), |
|
left, title, right); |
} |
} |
|
|
cdata = xmalloc(sizeof *cdata); |
cdata = xmalloc(sizeof *cdata); |