|
|
@ -129,9 +129,15 @@ int getstatus(char *str, char *last) |
|
|
|
#ifndef NO_X |
|
|
|
void setroot() |
|
|
|
{ |
|
|
|
if (!getstatus(statusstr[0], statusstr[1]))//Only set root if text has changed. |
|
|
|
if (!getstatus(statusstr[0], statusstr[1])) //Only set root if text has changed. |
|
|
|
return; |
|
|
|
XStoreName(dpy, root, statusstr[0]); |
|
|
|
|
|
|
|
size_t len = strlen(statusstr[0]) + 3; |
|
|
|
char *formatted_status = malloc(len); |
|
|
|
|
|
|
|
snprintf(formatted_status, len, " %s ", statusstr[0]); |
|
|
|
|
|
|
|
XStoreName(dpy, root, formatted_status); |
|
|
|
XFlush(dpy); |
|
|
|
} |
|
|
|
|
|
|
|