JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Fix xterm resource.
[spectrwm.git] / spectrwm.c
index 436e84d..4b71a4f 100644 (file)
@@ -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;