X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=spectrwm.c;h=2ecc60f77162f6fd97c608cac2a15fe4992bff2b;hb=09526664b2bce144ef3cade500a70786a5aeaeff;hp=4179ce372b49896fa335c5feb3893045e3602ab2;hpb=a10363decbac9b04827124411deb9f28458c25a0;p=spectrwm.git diff --git a/spectrwm.c b/spectrwm.c index 4179ce3..2ecc60f 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -1304,7 +1304,7 @@ socket_setnonblock(int fd) } void -bar_print(struct swm_region *r, char *s) +bar_print(struct swm_region *r, const char *s) { int x = 0; size_t len; @@ -1429,7 +1429,7 @@ bar_workspace_name(char *s, size_t sz, struct swm_region *r) /* build the default bar format according to the defined enabled options */ void -bar_fmt(char *fmtexp, char *fmtnew, struct swm_region *r, size_t sz) +bar_fmt(const char *fmtexp, char *fmtnew, struct swm_region *r, size_t sz) { /* if format provided, just copy the buffers */ if (bar_format != NULL) { @@ -1459,8 +1459,12 @@ bar_fmt(char *fmtexp, char *fmtnew, struct swm_region *r, size_t sz) if (urgent_enabled) strlcat(fmtnew, "* +U* ", sz); - if (title_class_enabled) + if (title_class_enabled) { strlcat(fmtnew, "+C", sz); + if (title_name_enabled == 0) + strlcat(fmtnew, " ", sz); + } + if (title_name_enabled) { /* add a colon if showing the class and something is focused */ if (title_class_enabled && r != NULL && r->ws != NULL && @@ -4588,7 +4592,7 @@ key_cmp(struct key *kp1, struct key *kp2) return (0); } -RB_GENERATE_STATIC(key_tree, key, entry, key_cmp); +RB_GENERATE(key_tree, key, entry, key_cmp); struct key_tree keys; /* mouse */