[wiki] [sites] [dwm][patches][rulerefresher] added rulerefresher patch || Lars Niesen
commit 284eb5cd9ec6e1b17f7c76f55c637e996d1aa5a4
Author: Lars Niesen <lars.niesen_AT_gmx.de>
Date: Fri Dec 3 12:23:17 2021 +0100
[dwm][patches][rulerefresher] added rulerefresher patch
diff --git a/dwm.suckless.org/patches/rulerefresher/dwm-rulerefresher-6.2.diff b/dwm.suckless.org/patches/rulerefresher/dwm-rulerefresher-6.2.diff
new file mode 100644
index 00000000..9de9f3ab
--- /dev/null
+++ b/dwm.suckless.org/patches/rulerefresher/dwm-rulerefresher-6.2.diff
_AT_@ -0,0 +1,49 @@
+From 94b9518be54da9c52d59465f41c403c6e35efb9f Mon Sep 17 00:00:00 2001
+From: Lars Niesen <lars.niesen_AT_gmx.de>
+Date: Fri, 3 Dec 2021 12:15:04 +0100
+Subject: [PATCH] rerun rules on window name chage
+
+---
+ dwm.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/dwm.c b/dwm.c
+index 4465af1..8fab7e3 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -223,6 +223,7 @@ static int updategeom(void);
+ static void updatenumlockmask(void);
+ static void updatesizehints(Client *c);
+ static void updatestatus(void);
++static void updaterules(Client *c);
+ static void updatetitle(Client *c);
+ static void updatewindowtype(Client *c);
+ static void updatewmhints(Client *c);
+_AT_@ -1237,6 +1238,7 @@ propertynotify(XEvent *e)
+ }
+ if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) {
+ updatetitle(c);
++ updaterules(c);
+ if (c == c->mon->sel)
+ drawbar(c->mon);
+ }
+_AT_@ -1992,6 +1994,16 @@ updatestatus(void)
+ drawbar(selmon);
+ }
+
++void
++updaterules(Client *c)
++{
++ applyrules(c);
++ if (c->isfloating)
++ resize(c, c->x, c->y,
++ c->w, c->h, 0);
++ arrange(c->mon);
++}
++
+ void
+ updatetitle(Client *c)
+ {
+--
+2.34.1
+
diff --git a/dwm.suckless.org/patches/rulerefresher/index.md b/dwm.suckless.org/patches/rulerefresher/index.md
new file mode 100644
index 00000000..99e82d19
--- /dev/null
+++ b/dwm.suckless.org/patches/rulerefresher/index.md
_AT_@ -0,0 +1,24 @@
+rulerefresher
+=============
+
+Description
+-----------
+This patch reruns the defined rules on a window name change.
+
+Example use case
+----------------
+
+Zoom:
+
+Every zoom window has the same name at creation und changes it afterwards.
+That renders different rules for different Zoom windows useless.
+With this patch the rules are reapplied after the rename.
+
+
+Download
+--------
+* [dwm-rulerefresher-6.2.diff](dwm-rulerefresher-6.2.diff)(2021-12-03)
+
+Author
+------
+* Lars Niesen - <lars.niesen_AT_gmx.de>
Received on Fri Dec 03 2021 - 12:26:59 CET
This archive was generated by hypermail 2.3.0
: Fri Dec 03 2021 - 12:36:45 CET