Files
dwmblocks/patches/space-padding.patch

34 lines
883 B
Diff

diff --git a/dwmblocks.c b/dwmblocks.c
index 3f7a1c2..f7a7c2e 100644
--- a/dwmblocks.c
+++ b/dwmblocks.c
@@ -165,10 +165,15 @@ void setroot()
{
- if (!getstatus(statusstr[0], statusstr[1]))//Only set root if text has changed.
- return;
- XStoreName(dpy, root, statusstr[0]);
- XFlush(dpy);
+ if (!getstatus(statusstr[0], statusstr[1])) // Only set root if text has changed.
+ return;
+
+ char outstr[STATUSLENGTH + 4];
+ snprintf(outstr, sizeof(outstr), " %s ", statusstr[0]);
+
+ XStoreName(dpy, root, outstr);
+ XFlush(dpy);
}
int setupX()
@@ -187,9 +192,13 @@ void pstdout()
{
- if (!getstatus(statusstr[0], statusstr[1]))//Only write out if text has changed.
- return;
- printf("%s\n",statusstr[0]);
- fflush(stdout);
+ if (!getstatus(statusstr[0], statusstr[1])) // Only write out if text has changed.
+ return;
+
+ printf(" %s \n", statusstr[0]);
+ fflush(stdout);
}