NMASTER PATCH
Description
This patch restores the ability to have multiple clients in the master area of the tiled layout. This feature was dropped from vanilla dwm in version 4.4.
ntile (-|=)
+----------+------+
| | |
| +------+
|----------| |
| +------+
| | |
+----------+------+
nbstack (-|-)
+--------+--------+
| | |
| | |
|-----+--+--+-----+
| | | |
| | | |
+-----+-----+-----+
Usage
- Download
nmaster.cinto the source directory of dwm. - Add
nmasterdefault value to yourconfig.h. - Include
nmaster.cinconfig.hafter the definition ofnmaster. - Add
ntileand/ornbstackto your layouts. - Add keybindings to
incnmasterand/orsetnmasterto yourconfig.h.
Example
static const int nmaster = 2; /* default number of clients in the master area */
#include "nmaster.c"
static const Layout layouts[] = {
/* symbol arrange function */
{ "-|=", ntile },
{ "-|-", nbstack },
...
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_a, incnmaster, {.i = +1 } },
{ MODKEY, XK_z, incnmaster, {.i = -1 } },
{ MODKEY, XK_x, setnmaster, {.i = 2 } },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0] } },
{ MODKEY, XK_b, setlayout, {.v = &layouts[1] } },
...
Download
- nmaster-sym.c (dwm 5.7.1) (20090927) – layout symbol shows the number of masters:
n]=,TnT - nmaster.c (dwm 5.6.1) (20090908)
- see older versions in historical patches