Several fixes, patched dwmblocks so it shows spaces around the bar

This commit is contained in:
2025-09-30 13:42:23 +02:00
parent a250278454
commit 3f399b5c0e
10 changed files with 90 additions and 22 deletions

View File

@@ -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);
}