index.md - sites - public wiki contents of suckless.org
(HTM) git clone git://git.suckless.org/sites
(DIR) Log
(DIR) Files
(DIR) Refs
---
index.md (2094B)
---
1 nmaster
2 =======
3
4 History
5 -------
6 This patch restores the ability to have multiple clients in the master area of
7 the tiled layout. This feature was dropped from vanilla dwm in version 4.4. The
8 ntile mode from below is included in dwm as of version 6.0.
9
10 Description
11 -----------
12 The figures show how tiling will work when the patch is applied.
13
14 ntile (-|=)
15 +----------+------+
16 | | |
17 | +------+
18 |----------| |
19 | +------+
20 | | |
21 +----------+------+
22
23 nbstack (-|-)
24 +--------+--------+
25 | | |
26 | | |
27 |-----+--+--+-----+
28 | | | |
29 | | | |
30 +-----+-----+-----+
31
32 Usage
33 -----
34 * Download `nmaster.c` into the source directory of dwm.
35 * Add `nmaster` default value to your `config.h`.
36 * Include `nmaster.c` in `config.h` after the definition of `nmaster`.
37 * Add `ntile` and/or `nbstack` to your layouts.
38 * Add keybindings to `incnmaster` and/or `setnmaster` to your `config.h`.
39
40 Example
41 -------
42 static const int nmaster = 2; /* default number of clients in the master area */
43
44 #include "nmaster.c"
45
46 static const Layout layouts[] = {
47 /* symbol arrange function */
48 { "-|=", ntile },
49 { "-|-", nbstack },
50 ...
51
52 static Key keys[] = {
53 /* modifier key function argument */
54 { MODKEY, XK_a, incnmaster, {.i = +1 } },
55 { MODKEY, XK_z, incnmaster, {.i = -1 } },
56 { MODKEY, XK_x, setnmaster, {.i = 2 } },
57 { MODKEY, XK_t, setlayout, {.v = &layouts[0] } },
58 { MODKEY, XK_b, setlayout, {.v = &layouts[1] } },
59 ...
60
61 Download
62 --------
63 * [nmaster-ncol.c](nmaster-ncol.c) (dwm 5.9) (20101210) - additional ncol layout (multiple masters side by side)
64 * [nmaster-sym.c](nmaster-sym.c) (dwm 5.7.1) (20090927) - layout symbol shows the number of masters: `n]=`, `TnT`
65 * [nmaster.c](nmaster.c) (dwm 5.6.1) (20090908)
66 * see older versions in [historical patches](../historical/)