X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=spectrwm.c;h=4b71a4f2ca73b0d6115838f1b0f88466b342feea;hb=ef1766f1a51616e55451e80e105cdd0264e296b9;hp=436e84d70158450a5e96403fa38860b44cd75e77;hpb=e67f9f1bfadf1be7d65944154a710a097b7ffa1a;p=spectrwm.git diff --git a/spectrwm.c b/spectrwm.c index 436e84d..4b71a4f 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -1369,6 +1369,17 @@ bar_title_name(char *s, size_t sz, struct swm_region *r) } void +bar_class_title_name(char *s, size_t sz, struct swm_region *r) +{ + if (r == NULL || r->ws == NULL || r->ws->focus == NULL) + return; + + bar_class_name(s, sz, r); + strlcat(s, ":", sz); + bar_title_name(s, sz, r); +} + +void bar_window_float(char *s, size_t sz, struct swm_region *r) { if (r == NULL || r ->ws == NULL || r->ws->focus == NULL) @@ -1542,6 +1553,9 @@ bar_replace_seq(char *fmt, char *fmtrep, struct swm_region *r, size_t *offrep, case 'N': snprintf(tmp, sizeof tmp, "%d", r->s->idx + 1); break; + case 'P': + bar_class_title_name(tmp, sizeof tmp, r); + break; case 'S': snprintf(tmp, sizeof tmp, "%s", r->ws->stacker); break;