[wiki] [sites] [dwm][patch][resetnmaster] Added the diff files which should have went through with previous commit. || cdarkly

From: <git_AT_suckless.org>
Date: Sun, 23 Jan 2022 22:41:29 +0100

commit d49d49104ec69a3b70089f84c569db94274f316e
Author: cdarkly <cdarkly_AT_protonmail.com>
Date: Sun Jan 23 16:39:53 2022 -0500

    [dwm][patch][resetnmaster] Added the diff files which should have went
    through with previous commit.

diff --git a/dwm.suckless.org/patches/resetnmaster/dwm-resetnmaster-6.3.diff b/dwm.suckless.org/patches/resetnmaster/dwm-resetnmaster-6.3.diff
new file mode 100644
index 00000000..2189c8f6
--- /dev/null
+++ b/dwm.suckless.org/patches/resetnmaster/dwm-resetnmaster-6.3.diff
_AT_@ -0,0 +1,36 @@
+diff -r -u a/config.def.h b/config.def.h
+--- a/config.def.h 2022-01-07 06:42:18.000000000 -0500
++++ b/config.def.h 2022-01-17 22:23:37.414513490 -0500
+_AT_@ -69,6 +69,7 @@
+ { MODKEY, XK_k, focusstack, {.i = -1 } },
+ { MODKEY, XK_i, incnmaster, {.i = +1 } },
+ { MODKEY, XK_d, incnmaster, {.i = -1 } },
++ { MODKEY, XK_o, resetnmaster, {0} },
+ { MODKEY, XK_h, setmfact, {.f = -0.05} },
+ { MODKEY, XK_l, setmfact, {.f = +0.05} },
+ { MODKEY, XK_Return, zoom, {0} },
+diff -r -u a/dwm.c b/dwm.c
+--- a/dwm.c 2022-01-07 06:42:18.000000000 -0500
++++ b/dwm.c 2022-01-17 22:25:05.850511492 -0500
+_AT_@ -189,6 +189,7 @@
+ static void propertynotify(XEvent *e);
+ static void quit(const Arg *arg);
+ static Monitor *recttomon(int x, int y, int w, int h);
++static void resetnmaster(const Arg *arg);
+ static void resize(Client *c, int x, int y, int w, int h, int interact);
+ static void resizeclient(Client *c, int x, int y, int w, int h);
+ static void resizemouse(const Arg *arg);
+_AT_@ -1270,6 +1271,13 @@
+ }
+
+ void
++resetnmaster(const Arg *arg)
++{
++ selmon->nmaster = 1;
++ arrange(selmon);
++}
++
++void
+ resize(Client *c, int x, int y, int w, int h, int interact)
+ {
+ if (applysizehints(c, &x, &y, &w, &h, interact))
diff --git a/dwm.suckless.org/patches/resetnmaster/dwm-resetnmaster-pertag-6.3.diff b/dwm.suckless.org/patches/resetnmaster/dwm-resetnmaster-pertag-6.3.diff
new file mode 100644
index 00000000..a3d12c0f
--- /dev/null
+++ b/dwm.suckless.org/patches/resetnmaster/dwm-resetnmaster-pertag-6.3.diff
_AT_@ -0,0 +1,36 @@
+diff -r -u a/config.def.h b/config.def.h
+--- a/config.def.h 2022-01-07 06:42:18.000000000 -0500
++++ b/config.def.h 2022-01-23 16:03:42.521951418 -0500
+_AT_@ -69,6 +69,7 @@
+ { MODKEY, XK_k, focusstack, {.i = -1 } },
+ { MODKEY, XK_i, incnmaster, {.i = +1 } },
+ { MODKEY, XK_d, incnmaster, {.i = -1 } },
++ { MODKEY, XK_o, resetnmaster, {0} },
+ { MODKEY, XK_h, setmfact, {.f = -0.05} },
+ { MODKEY, XK_l, setmfact, {.f = +0.05} },
+ { MODKEY, XK_Return, zoom, {0} },
+diff -r -u a/dwm.c b/dwm.c
+--- a/dwm.c 2022-01-23 16:06:01.221948285 -0500
++++ b/dwm.c 2022-01-23 16:05:35.949948855 -0500
+_AT_@ -191,6 +191,7 @@
+ static void propertynotify(XEvent *e);
+ static void quit(const Arg *arg);
+ static Monitor *recttomon(int x, int y, int w, int h);
++static void resetnmaster(const Arg *arg);
+ static void resize(Client *c, int x, int y, int w, int h, int interact);
+ static void resizeclient(Client *c, int x, int y, int w, int h);
+ static void resizemouse(const Arg *arg);
+_AT_@ -1296,6 +1297,13 @@
+ }
+
+ void
++resetnmaster(const Arg *arg)
++{
++ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = 1;
++ arrange(selmon);
++}
++
++void
+ resize(Client *c, int x, int y, int w, int h, int interact)
+ {
+ if (applysizehints(c, &x, &y, &w, &h, interact))
Received on Sun Jan 23 2022 - 22:41:29 CET

This archive was generated by hypermail 2.3.0 : Sun Jan 23 2022 - 22:48:46 CET