commit 764632f36c539bbae84bee2218a5a23ef98a1575
parent 1e20c8bda53bd22d2540abfc39801f81d8f01b49
Author: Jakub Profota <profojak@outlook.com>
Date: Sun, 22 Mar 2020 20:20:11 +0100
fixed typos in floatrules patch
Diffstat:
3 files changed, 66 insertions(+), 65 deletions(-)
diff --git a/dwm.suckless.org/patches/floatrules/dwm-floatrules-6.2-1.diff b/dwm.suckless.org/patches/floatrules/dwm-floatrules-6.2-1.diff
@@ -0,0 +1,64 @@
+diff -u dwm/config.def.h dwmnew/config.def.h
+--- dwm/config.def.h 2020-03-01 19:10:06.676821764 +1300
++++ dwmnew/config.def.h 2020-03-01 19:29:26.276901430 +1300
+@@ -26,9 +26,9 @@
+ * WM_CLASS(STRING) = instance, class
+ * WM_NAME(STRING) = title
+ */
+- /* class instance title tags mask isfloating monitor */
+- { "Gimp", NULL, NULL, 0, 1, -1 },
+- { "Firefox", NULL, NULL, 1 << 8, 0, -1 },
++ /* class instance title tags mask isfloating monitor float x,y,w,h floatborderpx*/
++ { "Gimp", NULL, NULL, 0, 1, -1, 50,50,500,500, 5 },
++ { "Firefox", NULL, NULL, 1 << 8, 0, -1, 50,50,500,500, 5 },
+ };
+
+ /* layout(s) */
+Only in dwmnew: config.h
+Only in dwmnew: drw.o
+diff -u dwm/dwm.c dwmnew/dwm.c
+--- dwm/dwm.c 2020-03-01 19:10:06.680155097 +1300
++++ dwmnew/dwm.c 2020-03-01 19:28:26.793564016 +1300
+@@ -93,6 +93,7 @@
+ int bw, oldbw;
+ unsigned int tags;
+ int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
++ int floatborderpx;
+ Client *next;
+ Client *snext;
+ Monitor *mon;
+@@ -139,6 +140,8 @@
+ unsigned int tags;
+ int isfloating;
+ int monitor;
++ int floatx, floaty, floatw, floath;
++ int floatborderpx;
+ } Rule;
+
+ /* function declarations */
+@@ -299,6 +302,13 @@
+ {
+ c->isfloating = r->isfloating;
+ c->tags |= r->tags;
++ c->floatborderpx = r->floatborderpx;
++ if (r->isfloating) {
++ c->x = r->floatx;
++ c->y = r->floaty;
++ c->w = r->floatw;
++ c->h = r->floath;
++ }
+ for (m = mons; m && m->num != r->monitor; m = m->next);
+ if (m)
+ c->mon = m;
+@@ -1281,7 +1291,10 @@
+ c->oldy = c->y; c->y = wc.y = y;
+ c->oldw = c->w; c->w = wc.width = w;
+ c->oldh = c->h; c->h = wc.height = h;
+- wc.border_width = c->bw;
++ if (c->isfloating)
++ wc.border_width = c->floatborderpx;
++ else
++ wc.border_width = c->bw;
+ XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
+ configure(c);
+ XSync(dpy, False);
diff --git a/dwm.suckless.org/patches/floatrules/dwm-floatrules-6.2.diff b/dwm.suckless.org/patches/floatrules/dwm-floatrules-6.2.diff
@@ -1,64 +0,0 @@
-diff -u dwm/config.def.h dwmnew/config.def.h
---- dwm/config.def.h 2020-03-01 19:10:06.676821764 +1300
-+++ dwmnew/config.def.h 2020-03-01 19:29:26.276901430 +1300
-@@ -26,9 +26,9 @@
- * WM_CLASS(STRING) = instance, class
- * WM_NAME(STRING) = title
- */
-- /* class instance title tags mask isfloating monitor */
-- { "Gimp", NULL, NULL, 0, 1, -1 },
-- { "Firefox", NULL, NULL, 1 << 8, 0, -1 },
-+ /* class instance title tags mask isfloating monitor float x,y,w,h floatborderpx*/
-+ { "Gimp", NULL, NULL, 0, 1, -1, 50,50,500,500, 5 },
-+ { "Firefox", NULL, NULL, 1 << 8, 0, -1, 50,50,500,500, 5 },
- };
-
- /* layout(s) */
-Only in dwmnew: config.h
-Only in dwmnew: drw.o
-diff -u dwm/dwm.c dwmnew/dwm.c
---- dwm/dwm.c 2020-03-01 19:10:06.680155097 +1300
-+++ dwmnew/dwm.c 2020-03-01 19:28:26.793564016 +1300
-@@ -93,6 +93,7 @@
- int bw, oldbw;
- unsigned int tags;
- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
-+ int floatbprderpx;
- Client *next;
- Client *snext;
- Monitor *mon;
-@@ -139,6 +140,8 @@
- unsigned int tags;
- int isfloating;
- int monitor;
-+ int floatx, floaty, floatw, floath;
-+ int floatborderpx;
- } Rule;
-
- /* function declarations */
-@@ -299,6 +302,13 @@
- {
- c->isfloating = r->isfloating;
- c->tags |= r->tags;
-+ c->floatbw = r->borderpx;
-+ if (r->isfloating) {
-+ c->x = r->floatx;
-+ c->y = r->floaty;
-+ c->w = r->floatw;
-+ c->h = r->floath;
-+ }
- for (m = mons; m && m->num != r->monitor; m = m->next);
- if (m)
- c->mon = m;
-@@ -1281,7 +1291,10 @@
- c->oldy = c->y; c->y = wc.y = y;
- c->oldw = c->w; c->w = wc.width = w;
- c->oldh = c->h; c->h = wc.height = h;
-- wc.border_width = c->bw;
-+ if (c->isfloating)
-+ wc.border_width = c->floatborderpx;
-+ else
-+ wc.border_width = c->bw;
- XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
- configure(c);
- XSync(dpy, False);
diff --git a/dwm.suckless.org/patches/floatrules/index.md b/dwm.suckless.org/patches/floatrules/index.md
@@ -16,8 +16,9 @@ Screenshots:
Download
--------
-* [dwm-floatrules-6.2.diff](dwm-floatrules-6.2.diff) (01.03.2020 - DD.MM.YYYY)
+* [dwm-floatrules-6.2-1.diff](dwm-floatrules-6.2-1.diff) (01.03.2020 - DD.MM.YYYY, fixed 22.03.2020)
Author
------
* Alex Cole
+* Jakub Profota (fix)