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 Currently, there are **8** layouts.
14 Just add your favourites to ``layouts`` table:
20 lain.layout.uselesstile,
24 Or set them on specific tags like this:
26 awful.layout.set(lain.layout.uselessfair, tags[1][7])
29 =========================
34 I do a lot of work on terminals. The common tiling algorithms usually
35 maximize windows, so you'll end up with a terminal that has about 200
36 columns or more. That's way too much. Have you ever read a manpage in a
37 terminal of this size?
39 This layout restricts the size of each window. Each window will have the
40 same width but is variable in height. Furthermore, windows are
41 left-aligned. The basic workflow is as follows (the number above the
42 screen is the number of open windows, the number in a cell is the fixed
46 +---+---+---+ +---+---+---+ +---+---+---+
47 | | | | | | | | | | | |
48 | 1 | | | -> | 2 | 1 | | -> | 3 | 2 | 1 | ->
49 | | | | | | | | | | | |
50 +---+---+---+ +---+---+---+ +---+---+---+
53 +---+---+---+ +---+---+---+ +---+---+---+
54 | 4 | | | | 5 | 4 | | | 6 | 5 | 4 |
55 +---+---+---+ -> +---+---+---+ -> +---+---+---+
56 | 3 | 2 | 1 | | 3 | 2 | 1 | | 3 | 2 | 1 |
57 +---+---+---+ +---+---+---+ +---+---+---+
59 The first client will be located in the left column. When opening
60 another window, this new window will be placed in the left column while
61 moving the first window into the middle column. Once a row is full,
62 another row above it will be created.
64 Default number of columns and rows are respectively taken from `nmaster`
65 and `ncol` values in `awful.tag`, but you can set your own.
67 For example, this sets `termfair` to 3 columns and at least 1 row:
69 lain.layout.termfair.nmaster = 3
70 lain.layout.termfair.ncol = 1
75 Similar to `termfair`, but with fixed number of vertical columns. Cols are centerded until there are `nmaster` columns, then windows are stacked as slaves, with possibly `ncol` clients per column at most.
78 +---+---+---+ +-+---+---+-+ +---+---+---+
79 | | | | | | | | | | | | |
80 | | 1 | | -> | | 1 | 2 | | -> | 1 | 2 | 3 | ->
81 | | | | | | | | | | | | |
82 +---+---+---+ +-+---+---+-+ +---+---+---+
85 +---+---+---+ +---+---+---+
87 + 1 + 2 +---+ -> + 1 +---+---+
89 +---+---+---+ +---+---+---+
91 Like `termfair`, default number of columns and rows are respectively taken from `nmaster`
92 and `ncol` values in `awful.tag`, but you can set your own.
96 lain.layout.centerfair.nmaster = 3
97 lain.layout.centerfair.ncol = 1
102 Cascade all windows of a tag.
104 You can control the offsets by setting these two variables:
106 lain.layout.cascade.cascade_offset_x = 64
107 lain.layout.cascade.cascade_offset_y = 16
109 The following reserves space for 5 windows:
111 lain.layout.cascade.nmaster = 5
113 That is, no window will get resized upon the creation of a new window,
114 unless there's more than 5 windows.
119 Similar to `awful.layout.suit.tile` layout, however, clients in the slave
120 column are cascaded instead of tiled.
122 Left column size can be set, otherwise is controlled by `mwfact` of the
123 tag. Additional windows will be opened in another column on the right.
124 New windows are placed above old windows.
126 Whether the slave column is placed on top of the master window or not is
127 controlled by the value of `ncol`. A value of 1 means "overlapping slave column"
128 and anything else means "don't overlap windows".
132 lain.layout.cascadetile.cascade_offset_x = 2
133 lain.layout.cascadetile.cascade_offset_y = 32
134 lain.layout.cascadetile.extra_padding = 5
135 lain.layout.cascadetile.nmaster = 5
138 `extra_padding` reduces the size of the master window if "overlapping
139 slave column" is activated. This allows you to see if there are any
140 windows in your slave column.
142 Setting `cascade_offset_x` to a very small value or even 0 is reccommended to avoid wasting space.
147 You start with one window, centered horizontally:
149 +--------------------------+
160 +--------------------------+
162 This is your main working window. You do most of the work right here.
163 Sometimes, you may want to open up additional windows. They're put in
164 the following four slots:
166 +--------------------------+
167 | +---+ +----------+ +---+ |
171 | +---+ | MAIN | +---+ |
176 | +---+ +----------+ +---+ |
177 +--------------------------+
179 Yes, the number "four" is fixed. In total, you can only have five open
180 windows with this layout. Additional windows are not managed and set to
181 floating mode. **This is intentional**.
183 You can set the order of the four auxiliary windows. This is the default
186 lain.layout.centerwork.top_left = 0
187 lain.layout.centerwork.top_right = 1
188 lain.layout.centerwork.bottom_left = 2
189 lain.layout.centerwork.bottom_right = 3
191 This means: The bottom left slot will be occupied by the third window
192 (not counting the main window). Suppose you want your windows to appear
195 +--------------------------+
196 | +---+ +----------+ +---+ |
200 | +---+ | MAIN | +---+ |
205 | +---+ +----------+ +---+ |
206 +--------------------------+
208 This would require you to use these settings:
210 lain.layout.centerwork.top_left = 3
211 lain.layout.centerwork.top_right = 0
212 lain.layout.centerwork.bottom_left = 2
213 lain.layout.centerwork.bottom_right = 1
215 *Please note:* If you use Awesome's default configuration, navigation in
216 this layout may be very confusing. How do you get from the main window
217 to satellite ones depends on the order in which the windows are opened.
218 Thus, use of `awful.client.focus.bydirection()` is suggested.
221 globalkeys = awful.util.table.join(
223 awful.key({ modkey }, "j",
225 awful.client.focus.bydirection("down")
226 if client.focus then client.focus:raise() end
228 awful.key({ modkey }, "k",
230 awful.client.focus.bydirection("up")
231 if client.focus then client.focus:raise() end
233 awful.key({ modkey }, "h",
235 awful.client.focus.bydirection("left")
236 if client.focus then client.focus:raise() end
238 awful.key({ modkey }, "l",
240 awful.client.focus.bydirection("right")
241 if client.focus then client.focus:raise() end
246 uselessfair, uselesspiral & uselesstile
247 ---------------------------------------
248 These are duplicates of the stock `fair`, `spiral` and `tile` layouts.
250 However, "useless gaps" (see below) have been added.
255 Useless gaps are gaps between windows. They are "useless" because they
256 serve no special purpose despite increasing overview. I find it easier
257 to recognize window boundaries if windows are set apart a little bit.
259 The `uselessfair` layout, for example, looks like this:
273 All of lain layouts provide useless gaps. To set the width of the gaps,
274 you have to add an item called `useless_gap_width` in your `theme.lua`.
275 If it doesn't exist, the width will default to 0.
278 theme.useless_gap_width = 10
280 What about layout icons?
281 ========================
283 They are located in ``lain/icons/layout``.
285 To use them, add lines to your ``theme.lua`` like this:
287 theme.lain_icons = os.getenv("HOME") .. "/.config/awesome/lain/icons/layout/default/"
288 theme.layout_termfair = theme.lain_icons .. "termfairw.png"
289 theme.layout_cascade = theme.lain_icons .. "cascadew.png"
290 theme.layout_cascadetile = theme.lain_icons .. "cascadetilew.png"
291 theme.layout_centerwork = theme.lain_icons .. "centerworkw.png"
293 Credits goes to [Nicolas Estibals](https://github.com/nestibal) for creating
294 layout icons for default theme.
296 You can use them as a template for your custom versions.
298 [<- home](https://github.com/copycat-killer/lain/wiki)