commit 3f56f5a57d63e3490dce9435dd93cc1da29f75e0
Author: aleks <[email protected]>
Date:   Fri Sep 11 18:56:52 2020 +0200

    [dwm][patches][setstatus] add; no more xsetroot!

diff --git a/dwm.suckless.org/patches/setstatus/dwm-setstatus-6.2.diff 
b/dwm.suckless.org/patches/setstatus/dwm-setstatus-6.2.diff
new file mode 100644
index 00000000..1c85bb40
--- /dev/null
+++ b/dwm.suckless.org/patches/setstatus/dwm-setstatus-6.2.diff
@@ -0,0 +1,39 @@
+From dbfb346a86c79b50bfa27c75547b42e34cb54715 Mon Sep 17 00:00:00 2001
+From: aleks <[email protected]>
+Date: Fri, 11 Sep 2020 17:42:50 +0200
+Subject: [PATCH] Apply setstatus-6.2
+
+Enables to set the status with dwm itself. No more xsetroot bloat!
+To change the status to `foo bar` execute:
+
+    dwm -s "foo bar"
+---
+ dwm.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/dwm.c b/dwm.c
+index 4465af1..b3c8f71 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -2129,12 +2129,17 @@ main(int argc, char *argv[])
+ {
+       if (argc == 2 && !strcmp("-v", argv[1]))
+               die("dwm-"VERSION);
+-      else if (argc != 1)
++      else if (argc != 1 && strcmp("-s", argv[1]))
+               die("usage: dwm [-v]");
+       if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
+               fputs("warning: no locale support
", stderr);
+       if (!(dpy = XOpenDisplay(NULL)))
+               die("dwm: cannot open display");
++      if (argc > 1 && !strcmp("-s", argv[1])) {
++              XStoreName(dpy, RootWindow(dpy, DefaultScreen(dpy)), argv[2]);
++              XCloseDisplay(dpy);
++              return 0;
++      }
+       checkotherwm();
+       setup();
+ #ifdef __OpenBSD__
+-- 
+2.28.0
+
diff --git a/dwm.suckless.org/patches/setstatus/index.md 
b/dwm.suckless.org/patches/setstatus/index.md
new file mode 100644
index 00000000..065b7d8a
--- /dev/null
+++ b/dwm.suckless.org/patches/setstatus/index.md
@@ -0,0 +1,17 @@
+setstatus
+=========
+
+Description
+-----------
+Enables to set the status with dwm itself. No more xsetroot bloat!
+To change the status to `foo bar` execute:
+
+    dwm -s "foo bar"
+
+Download
+--------
+* [dwm-setstatus-6.2.diff](dwm-setstatus-6.2.diff)
+
+Author
+------
+* Aleksandrs Stier (6.2)


Reply via email to