Introduction
Introduction Statistics Contact Development Disclaimer Help
added patch page: defaultmfact - sites - public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log
Files
Refs
---
commit bb95ccab5e7c4c06335d71fd118f92d3b703b3a9
parent ccd6fe6134894126f4d226fa51c23a615cefae1c
Author: Rumen <[email protected]>
Date: Fri, 3 Jan 2025 13:01:45 +0100
added patch page: defaultmfact
patch allows for a default mfact value, which setmfact
can be reset back to
Diffstat:
A dwm.suckless.org/patches/defaultmf… | 56 +++++++++++++++++++++++++++…
A dwm.suckless.org/patches/defaultmf… | 17 +++++++++++++++++
2 files changed, 73 insertions(+), 0 deletions(-)
---
diff --git a/dwm.suckless.org/patches/defaultmfact/dwm-defaultmfact-6.5.diff b/…
@@ -0,0 +1,56 @@
+From c22678978ff22d2c40c56ffecd7a9306183872f5 Mon Sep 17 00:00:00 2001
+From: Rumen <[email protected]>
+Date: Fri, 3 Jan 2025 12:36:19 +0100
+Subject: [PATCH] patch: setting default mfact + example keybind
+
+---
+ config.def.h | 4 +++-
+ dwm.c | 7 +++++++
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/config.def.h b/config.def.h
+index 9efa774..368fc0e 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -32,7 +32,8 @@ static const Rule rules[] = {
+ };
+
+ /* layout(s) */
+-static const float mfact = 0.55; /* factor of master area size [0.05..0.9…
++#define DEFAULT_MFACT
++static const float mfact = DEFAULT_MFACT; /* factor of master area size […
+ static const int nmaster = 1; /* number of clients in master area */
+ static const int resizehints = 1; /* 1 means respect size hints in tiled r…
+ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen …
+@@ -71,6 +72,7 @@ static const Key keys[] = {
+ { MODKEY, XK_d, incnmaster, {.i = -1 }…
+ { MODKEY, XK_h, setmfact, {.f = -0.0…
+ { MODKEY, XK_l, setmfact, {.f = +0.0…
++ { MODKEY, XK_equal, setmfact, {.f = -1.0…
+ { MODKEY, XK_Return, zoom, {0} },
+ { MODKEY, XK_Tab, view, {0} },
+ { MODKEY|ShiftMask, XK_c, killclient, {0} },
+diff --git a/dwm.c b/dwm.c
+index 1443802..057fde7 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -1521,9 +1521,16 @@ setlayout(const Arg *arg)
+ }
+
+ /* arg > 1.0 will set mfact absolutely */
++/* arg <= -1.0 will set mfact to MASTER_DEFAULT */
+ void
+ setmfact(const Arg *arg)
+ {
++ if (arg->f <= -1.0) {
++ selmon->mfact = MASTER_DEFAULT;
++ arrange(selmon);
++ return;
++ }
++
+ float f;
+
+ if (!arg || !selmon->lt[selmon->sellt]->arrange)
+--
+2.47.1
+
diff --git a/dwm.suckless.org/patches/defaultmfact/index.md b/dwm.suckless.org/…
@@ -0,0 +1,17 @@
+defaultmfact
+============
+
+Description
+-----------
+Allows master tile separator to be reset to default value (DEFAULT_MFACT).
+Default keybinding for this behaviour is MODMASK + XK_equal.
+
+Tested only with Tiled layout so far.
+
+Download
+--------
+* [dwm-defaultmfact-6.5.diff](dwm-defaultmfact-6.5.diff), 2025-01-03
+
+Author
+------
+* Rumen Mitov - <[email protected]>
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.