Several fixes, patched dwmblocks so it shows spaces around the bar
This commit is contained in:
13
dwmblocks.c
13
dwmblocks.c
@@ -128,9 +128,13 @@ 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]);
|
||||
|
||||
char outstr[STATUSLENGTH + 4];
|
||||
snprintf(outstr, sizeof(outstr), " %s ", statusstr[0]);
|
||||
|
||||
XStoreName(dpy, root, outstr);
|
||||
XFlush(dpy);
|
||||
}
|
||||
|
||||
@@ -149,9 +153,10 @@ int setupX()
|
||||
|
||||
void pstdout()
|
||||
{
|
||||
if (!getstatus(statusstr[0], statusstr[1]))//Only write out if text has changed.
|
||||
if (!getstatus(statusstr[0], statusstr[1])) // Only write out if text has changed.
|
||||
return;
|
||||
printf("%s\n",statusstr[0]);
|
||||
|
||||
printf(" %s \n", statusstr[0]);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user