diff --git a/src/client.c b/src/client.c index 3a22700..642975a 100644 --- a/src/client.c +++ b/src/client.c @@ -370,11 +370,20 @@ client_grabbuttons(struct client *c, bool focused) if((rm = ((x + f) - (c->rgeo.w - c->border))) > 0) \ f -= rm; -#define _STATUSLINE(C, b) \ - sctx = (b ? &c->theme->client_s_sl : &c->theme->client_n_sl); \ - sctx->barwin = C->titlebar; \ - status_copy_mousebind(sctx); \ - status_render(sctx); +#define _STATUSLINE(C, b) \ + do { \ + sctx = (b ? &c->theme->client_s_sl : &c->theme->client_n_sl); \ + sctx->barwin = C->titlebar; \ + status_copy_mousebind(sctx); \ + status_render(sctx); \ + if(C->flags & CLIENT_FREE) \ + { \ + sctx = &c->theme->client_f_sl; \ + sctx->barwin = C->titlebar; \ + status_copy_mousebind(sctx); \ + status_render(sctx); \ + } \ + } while(/* CONSTCOND */ 0); void client_frame_update(struct client *c, struct colpair *cp) { diff --git a/src/config.c b/src/config.c index e9bf55e..506b92f 100644 --- a/src/config.c +++ b/src/config.c @@ -122,14 +122,18 @@ config_theme(void) /* status line */ t->client_n_sl = status_new_ctx(NULL, t); t->client_s_sl = status_new_ctx(NULL, t); + t->client_f_sl = status_new_ctx(NULL, t); ISTRDUP(t->client_n_sl.status, fetch_opt_first(ks[i], "", "client_normal_statusline").str); ISTRDUP(t->client_s_sl.status, fetch_opt_first(ks[i], "", "client_sel_statusline").str); + ISTRDUP(t->client_f_sl.status, fetch_opt_first(ks[i], "", "client_free_statusline").str); if(t->client_n_sl.status) status_parse(&t->client_n_sl); if(t->client_s_sl.status) status_parse(&t->client_s_sl); + if(t->client_f_sl.status) + status_parse(&t->client_f_sl); SLIST_INSERT_TAIL(&W->h.theme, t, next, p); diff --git a/src/wmfs.h b/src/wmfs.h index 84d25f9..ab3e38c 100644 --- a/src/wmfs.h +++ b/src/wmfs.h @@ -273,7 +273,7 @@ struct theme /* client / frame */ struct colpair client_n, client_s; - struct status_ctx client_n_sl, client_s_sl; + struct status_ctx client_n_sl, client_s_sl, client_f_sl; Color frame_bg; int client_titlebar_width; int client_border_width;