From b23a9c430b4c8af2b71a2bd6c7cd74f550ef42e6 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Thu, 27 Jan 2022 03:18:42 -0500 Subject: patch: centeredmaster centeredmaster and centeredfloatingmaster are two stack layouts for dwm. 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 || || || || || || || || || || |+--------++--------++--------+| |+--------++--------++--------+| +------------------------------+ +------------------------------+ centeredfloatingmaster centers the nmaster area on screen, using mfact * monitor width & height over a horizontally tiled stack area, comparable to a scratchpad. It can be selected with [Alt]+[o]. With one and two clients in master respectively this results in: +------------------------------+ +------------------------------+ |+--------++--------++--------+| |+--------++--------++--------+| || || || || || || || || || +------------------+ || || +--------++--------+ || || | | || || | || | || || | | || || | || | || || | M | || || | M1 || M2 | || || | | || || | || | || || +------------------+ || || +--------++--------+ || || || || || || || || || |+--------++--------++--------+| |+--------++--------++--------+| +------------------------------+ +------------------------------+ These stack layouts 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. They allow for instance to center the editor while being able to keep an eye on background processes (logs, tests,...) --- config.def.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index 3242ea1..37b38d5 100644 --- a/config.def.h +++ b/config.def.h @@ -47,6 +47,8 @@ static const Layout layouts[] = { { "[]=", tile }, /* first entry is default */ { "><>", NULL }, /* no layout function means floating behavior */ { "[M]", monocle }, + { "|M|", centeredmaster }, + { ">M>", centeredfloatingmaster }, }; /* key definitions */ @@ -89,6 +91,8 @@ 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_o, setlayout, {.v = &layouts[4]} }, { MODKEY, XK_comma, focusmon, {.i = -1 } }, { MODKEY, XK_period, focusmon, {.i = +1 } }, { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, -- cgit v1.2.3