All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 [<- home](https://github.com/copycat-killer/lain/wiki)
3 Currently, there are **7** layouts.
15 Just add your favourites to ``layouts`` table:
21 lain.layout.uselesstile,
25 Or set them on specific tags like this:
27 awful.layout.set(lain.layout.uselessfair, tags[1][7])
30 =========================
35 Cascade all windows of a tag.
37 You can control the offsets by setting those two variables:
39 lain.layout.cascade.cascade_offset_x = 64
40 lain.layout.cascade.cascade_offset_y = 16
42 The following reserves space for 5 windows:
44 lain.layout.cascade.nmaster = 5
46 That is, no window will get resized upon the creation of a new window,
47 unless there's more than 5 windows.
52 Similar to `awful.layout.suit.tile` layout, however, clients in the slave
53 column are cascaded instead of tiled.
55 Left column size can be set, otherwise is controlled by `mwfact` of the
56 tag. Additional windows will be opened in another column on the right.
57 New windows are placed above old windows.
59 Whether the slave column is placed on top of the master window or not is
60 controlled by the value of `ncol`. A value of 1 means "overlapping slave column"
61 and anything else means "don't overlap windows".
65 lain.layout.cascadetile.cascade_offset_x = 2
66 lain.layout.cascadetile.cascade_offset_y = 32
67 lain.layout.cascadetile.extra_padding = 5
68 lain.layout.cascadetile.nmaster = 5
71 `extra_padding` reduces the size of the master window if "overlapping
72 slave column" is activated. This allows you to see if there are any
73 windows in your slave column.
75 Setting `cascade_offset_x` to a very small value or even 0 is reccommended to avoid wasting space.
80 You start with one window, centered horizontally:
82 +--------------------------+
93 +--------------------------+
95 This is your main working window. You do most of the work right here.
96 Sometimes, you may want to open up additional windows. They're put in
97 the following four slots:
99 +--------------------------+
100 | +---+ +----------+ +---+ |
104 | +---+ | MAIN | +---+ |
109 | +---+ +----------+ +---+ |
110 +--------------------------+
112 Yes, the number "four" is fixed. In total, you can only have five open
113 windows with this layout. Additional windows are not managed and set to
114 floating mode. **This is intentional**.
116 You can set the order of the four auxiliary windows. This is the default
119 lain.layout.centerwork.top_left = 0
120 lain.layout.centerwork.top_right = 1
121 lain.layout.centerwork.bottom_left = 2
122 lain.layout.centerwork.bottom_right = 3
124 This means: The bottom left slot will be occupied by the third window
125 (not counting the main window). Suppose you want your windows to appear
128 +--------------------------+
129 | +---+ +----------+ +---+ |
133 | +---+ | MAIN | +---+ |
138 | +---+ +----------+ +---+ |
139 +--------------------------+
141 This would require you to use these settings:
143 lain.layout.centerwork.top_left = 3
144 lain.layout.centerwork.top_right = 0
145 lain.layout.centerwork.bottom_left = 2
146 lain.layout.centerwork.bottom_right = 1
148 *Please note:* If you use Awesome's default configuration, navigation in
149 this layout may be very confusing. How do you get from the main window
150 to satellite ones depends on the order in which the windows are opened.
151 Thus, use of `awful.client.focus.bydirection()` is suggested.
154 globalkeys = awful.util.table.join(
156 awful.key({ modkey }, "j",
158 awful.client.focus.bydirection("down")
159 if client.focus then client.focus:raise() end
161 awful.key({ modkey }, "k",
163 awful.client.focus.bydirection("up")
164 if client.focus then client.focus:raise() end
166 awful.key({ modkey }, "h",
168 awful.client.focus.bydirection("left")
169 if client.focus then client.focus:raise() end
171 awful.key({ modkey }, "l",
173 awful.client.focus.bydirection("right")
174 if client.focus then client.focus:raise() end
182 I do a lot of work on terminals. The common tiling algorithms usually
183 maximize windows, so you'll end up with a terminal that has about 200
184 columns or more. That's way too much. Have you ever read a manpage in a
185 terminal of this size?
187 This layout restricts the size of each window. Each window will have the
188 same width but is variable in height. Furthermore, windows are
189 left-aligned. The basic workflow is as follows (the number above the
190 screen is the number of open windows, the number in a cell is the fixed
194 +---+---+---+ +---+---+---+ +---+---+---+
195 | | | | | | | | | | | |
196 | 1 | | | -> | 2 | 1 | | -> | 3 | 2 | 1 | ->
197 | | | | | | | | | | | |
198 +---+---+---+ +---+---+---+ +---+---+---+
201 +---+---+---+ +---+---+---+ +---+---+---+
202 | 4 | | | | 5 | 4 | | | 6 | 5 | 4 |
203 +---+---+---+ -> +---+---+---+ -> +---+---+---+
204 | 3 | 2 | 1 | | 3 | 2 | 1 | | 3 | 2 | 1 |
205 +---+---+---+ +---+---+---+ +---+---+---+
207 The first client will be located in the left column. When opening
208 another window, this new window will be placed in the left column while
209 moving the first window into the middle column. Once a row is full,
210 another row above it will be created.
212 Default number of columns and rows are respectively taken from `nmaster`
213 and `ncol` values in `awful.tag`, but you can set your own.
215 For example, this sets `termfair` to 3 columns and at least 1 row:
217 lain.layout.termfair.nmaster = 3
218 lain.layout.termfair.ncol = 1
220 uselessfair, uselesspiral & uselesstile
221 ---------------------------------------
222 These are duplicates of the stock `fair`, `spiral` and `tile` layouts.
224 However, "useless gaps" (see below) have been added.
229 Useless gaps are gaps between windows. They are "useless" because they
230 serve no special purpose despite increasing overview. I find it easier
231 to recognize window boundaries if windows are set apart a little bit.
233 The `uselessfair` layout, for example, looks like this:
247 All of lain layouts provide useless gaps. To set the width of the gaps,
248 you have to add an item called `useless_gap_width` in your `theme.lua`.
249 If it doesn't exist, the width will default to 0.
252 theme.useless_gap_width = "5"
254 What about layout icons?
255 ========================
257 They are located in ``lain/icons/layout``.
259 To use them, add lines to your ``theme.lua`` like this:
261 theme.lain_icons = os.getenv("HOME") .. "/.config/awesome/lain/icons/layout/default/"
262 theme.layout_termfair = theme.lain_icons .. "termfairw.png"
263 theme.layout_cascade = theme.lain_icons .. "cascadew.png"
264 theme.layout_cascadetile = theme.lain_icons .. "cascadetilew.png"
265 theme.layout_centerwork = theme.lain_icons .. "centerworkw.png"
267 Credits goes to [Nicolas Estibals](https://github.com/nestibal) for creating
268 layout icons for default theme.
270 You can use them as a template for your custom versions.