Several fixes, patched dwmblocks so it shows spaces around the bar
This commit is contained in:
33
patches/space-padding.patch
Normal file
33
patches/space-padding.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
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);
|
||||
}
|
Reference in New Issue
Block a user