9 |-- centerwork.horizontal
14 As usual, specify your favourites in `awful.layout.layouts`, or set them on specific tags with [`awful.layout.set`](https://awesomewm.org/doc/api/libraries/awful.layout.html#set).
17 awful.layout.set(lain.layout.termfair, tag)
26 This layout restricts the size of each window. Each window will have the
27 same width but is variable in height. Furthermore, windows are
28 left-aligned. The basic workflow is as follows (the number above the
29 screen is the number of open windows, the number in a cell is the fixed
33 +---+---+---+ +---+---+---+ +---+---+---+
34 | | | | | | | | | | | |
35 | 1 | | | -> | 2 | 1 | | -> | 3 | 2 | 1 | ->
36 | | | | | | | | | | | |
37 +---+---+---+ +---+---+---+ +---+---+---+
40 +---+---+---+ +---+---+---+ +---+---+---+
41 | 4 | | | | 5 | 4 | | | 6 | 5 | 4 |
42 +---+---+---+ -> +---+---+---+ -> +---+---+---+
43 | 3 | 2 | 1 | | 3 | 2 | 1 | | 3 | 2 | 1 |
44 +---+---+---+ +---+---+---+ +---+---+---+
46 The first client will be located in the left column. When opening
47 another window, this new window will be placed in the left column while
48 moving the first window into the middle column. Once a row is full,
49 another row above it will be created.
51 Default number of columns and rows are respectively taken from `nmaster`
52 and `ncol` values in `awful.tag`, but you can set your own.
54 For example, this sets `termfair` to 3 columns and at least 1 row:
57 lain.layout.termfair.nmaster = 3
58 lain.layout.termfair.ncol = 1
64 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.
67 +---+---+---+ +-+---+---+-+ +---+---+---+
68 | | | | | | | | | | | | |
69 | | 1 | | -> | | 1 | 2 | | -> | 1 | 2 | 3 | ->
70 | | | | | | | | | | | | |
71 +---+---+---+ +-+---+---+-+ +---+---+---+
74 +---+---+---+ +---+---+---+
76 + 1 + 2 +---+ -> + 1 +---+---+
78 +---+---+---+ +---+---+---+
80 Like `termfair`, default number of columns and rows are respectively taken from `nmaster`
81 and `ncol` values in `awful.tag`, but you can set your own.
83 For example, this sets `termfair.center` to 3 columns and at least 1 row:
86 lain.layout.termfair.center.nmaster = 3
87 lain.layout.termfair.center.ncol = 1
93 Cascade all windows of a tag.
95 You can control the offsets by setting these two variables:
98 lain.layout.cascade.offset_x = 64
99 lain.layout.cascade.offset_y = 16
102 The following reserves space for 5 windows:
105 lain.layout.cascade.nmaster = 5
108 That is, no window will get resized upon the creation of a new window,
109 unless there's more than 5 windows.
114 Similar to `awful.layout.suit.tile` layout, however, clients in the slave
115 column are cascaded instead of tiled.
117 Left column size can be set, otherwise is controlled by `mwfact` of the
118 tag. Additional windows will be opened in another column on the right.
119 New windows are placed above old windows.
121 Whether the slave column is placed on top of the master window or not is
122 controlled by the value of `ncol`. A value of 1 means "overlapping slave column"
123 and anything else means "don't overlap windows".
128 lain.layout.cascade.tile.offset_x = 2
129 lain.layout.cascade.tile.offset_y = 32
130 lain.layout.cascade.tile.extra_padding = 5
131 lain.layout.cascade.tile.nmaster = 5
132 lain.layout.cascade.tile.ncol = 2
135 `extra_padding` reduces the size of the master window if "overlapping
136 slave column" is activated. This allows you to see if there are any
137 windows in your slave column.
139 Setting `offset_x` to a very small value or even 0 is recommended to avoid wasting space.
144 You start with one window, centered horizontally:
146 +--------------------------+
157 +--------------------------+
159 This is your main working window. You do most of the work right here.
160 Sometimes, you may want to open up additional windows. They're put on left and right, alternately.
162 +--------------------------+
163 | +---+ +----------+ +---+ |
167 | +---+ | MAIN | +---+ |
172 | +---+ +----------+ +---+ |
173 +--------------------------+
175 *Please note:* If you use Awesome's default configuration, navigation in
176 this layout may be very confusing. How do you get from the main window
177 to satellite ones depends on the order in which the windows are opened.
178 Thus, use of `awful.client.focus.bydirection()` is suggested.
182 globalkeys = awful.util.table.join(
184 awful.key({ modkey }, "j",
186 awful.client.focus.bydirection("down")
187 if client.focus then client.focus:raise() end
189 awful.key({ modkey }, "k",
191 awful.client.focus.bydirection("up")
192 if client.focus then client.focus:raise() end
194 awful.key({ modkey }, "h",
196 awful.client.focus.bydirection("left")
197 if client.focus then client.focus:raise() end
199 awful.key({ modkey }, "l",
201 awful.client.focus.bydirection("right")
202 if client.focus then client.focus:raise() end
208 `centerwork.horizontal`
211 Same as `centerwork`, except that the main
212 window expands horizontally, and the additional windows
213 are put ontop/below it. Useful if you have a screen turned 90°.
215 Pre 4.0 `uselesstile` patches
216 =============================
218 In branch 3.5, this module provided useless gaps layouts. Since useless gaps have been implemented in Awesome 4.0, those layouts have been removed.
220 Following are a couple of `uselesstile` variants that were not part of lain. They are kept only for reference and are not supported.
225 If you want to have `awful.layout.suit.tile` behave like xmonad, with internal gaps two times wider than external ones, download [this](https://gist.github.com/lcpz/9e56dcfbe66bfe14967c) as `lain/layout/uselesstile`.
230 Want to invert master window position? Use [this](https://gist.github.com/lcpz/c59dc59c9f99d98218eb) version. You can set `single_gap` with `width` and `height` in your `theme.lua`, in order to define the window geometry when there's only one client, otherwise it goes maximized. An example:
232 theme.single_gap = { width = 600, height = 100 }
234 What about layout icons?
235 ========================
237 They are located in ``lain/icons/layout``.
239 To use them, define new `layout_*` variables in your ``theme.lua``. For instance:
242 theme.lain_icons = os.getenv("HOME") ..
243 "/.config/awesome/lain/icons/layout/default/"
244 theme.layout_termfair = theme.lain_icons .. "termfair.png"
245 theme.layout_centerfair = theme.lain_icons .. "centerfair.png" -- termfair.center
246 theme.layout_cascade = theme.lain_icons .. "cascade.png"
247 theme.layout_cascadetile = theme.lain_icons .. "cascadetile.png" -- cascade.tile
248 theme.layout_centerwork = theme.lain_icons .. "centerwork.png"
249 theme.layout_centerworkh = theme.lain_icons .. "centerworkh.png" -- centerwork.horizontal
252 Credit goes to [Nicolas Estibals](https://github.com/nestibal) for creating
253 layout icons for default theme.
255 You can use them as a template for your custom versions.