summaryrefslogtreecommitdiffstats
path: root/config.def.h
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2024-03-02 11:05:58 -0500
committerMalfurious <m@lfurio.us>2024-03-05 21:04:47 -0500
commit72bcdd4d6be18975843637ad0a5e2f21de5fea82 (patch)
treef0ff5780a9b0e7f0d8649ccc3baaaea9486bbceb /config.def.h
parent2d0d68ce93d35a46029879addd567c89cc41597d (diff)
downloaddwm-72bcdd4d6be18975843637ad0a5e2f21de5fea82.tar.gz
dwm-72bcdd4d6be18975843637ad0a5e2f21de5fea82.zip
patch: centeredmaster
centeredmaster centers the nmaster area on screen, using mfact * monitor width & height, with the stacked windows distributed to the left and right. It can be selected with [Alt]+[u]. With one and two clients in master respectively this results in: +------------------------------+ +------------------------------+ |+--------++--------++--------+| |+--------++--------++--------+| || || || || || || || || || || || || || || M1 || || || || || || || || || || || S2 || M || S1 || || |+--------+| || || || || || || |+--------+| || || || || || || || || || || || || || || || M2 || || || || || || || || || || |+--------++--------++--------+| |+--------++--------++--------+| +------------------------------+ +------------------------------+ This layout can be useful on large screens, where monocle or htile might be either too large or forcing the user to type in a corner of the screen. It allows for instance to center the editor while being able to keep an eye on background processes (logs, tests, ...).
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h
index aae7682..62319e2 100644
--- a/config.def.h
+++ b/config.def.h
@@ -49,6 +49,7 @@ static const Layout layouts[] = {
{ "[]=", tile }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
+ { "|M|", centeredmaster },
};
/* key definitions */
@@ -96,6 +97,7 @@ static const Key keys[] = {
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
+ { MODKEY, XK_u, setlayout, {.v = &layouts[3]} },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },