25 lines
527 B
Plaintext
Executable File
25 lines
527 B
Plaintext
Executable File
--- dwm.c
|
|
+++ dwm.c
|
|
@@ -2018,8 +2049,20 @@ updatesizehints(Client *c)
|
|
void
|
|
updatestatus(void)
|
|
{
|
|
- if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
|
|
+ char text[512];
|
|
+ if (!gettextprop(root, XA_WM_NAME, text, sizeof(text))) {
|
|
strcpy(stext, "dwm-"VERSION);
|
|
+ estext[0] = '\0';
|
|
+ } else {
|
|
+ char *e = strchr(text, statussep);
|
|
+ if (e) {
|
|
+ *e = '\0'; e++;
|
|
+ strncpy(estext, e, sizeof(estext) - 1);
|
|
+ } else {
|
|
+ estext[0] = '\0';
|
|
+ }
|
|
+ strncpy(stext, text, sizeof(stext) - 1);
|
|
+ }
|
|
drawbar(selmon);
|
|
}
|
|
|