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 **7** layouts.
13 Just add your favourites to ``layouts`` table:
19 lain.layout.uselesstile,
23 Or set them on specific tags like this:
25 awful.layout.set(lain.layout.uselessfair, tags[1][7])
28 =========================
33 Cascade all windows of a tag.
35 You can control the offsets by setting those two variables:
37 lain.layout.cascade.cascade_offset_x = 64
38 lain.layout.cascade.cascade_offset_y = 16
40 The following reserves space for 5 windows:
42 lain.layout.cascade.nmaster = 5
44 That is, no window will get resized upon the creation of a new window,
45 unless there's more than 5 windows.
50 Similar to `awful.layout.suit.tile` layout, however, clients in the slave
51 column are cascaded instead of tiled.
53 Left column size can be set, otherwise is controlled by `mwfact` of the
54 tag. Additional windows will be opened in another column on the right.
55 New windows are placed above old windows.
57 Whether the slave column is placed on top of the master window or not is
58 controlled by the value of `ncol`. A value of 1 means "overlapping slave column"
59 and anything else means "don't overlap windows".
63 lain.layout.cascadetile.cascade_offset_x = 2
64 lain.layout.cascadetile.cascade_offset_y = 32
65 lain.layout.cascadetile.extra_padding = 5
66 lain.layout.cascadetile.nmaster = 5
69 `extra_padding` reduces the size of the master window if "overlapping
70 slave column" is activated. This allows you to see if there are any
71 windows in your slave column.
73 Setting `cascade_offset_x` to a very small value or even 0 is reccommended to avoid wasting space.
78 You start with one window, centered horizontally:
80 +--------------------------+
91 +--------------------------+
93 This is your main working window. You do most of the work right here.
94 Sometimes, you may want to open up additional windows. They're put in
95 the following four slots:
97 +--------------------------+
98 | +---+ +----------+ +---+ |
102 | +---+ | MAIN | +---+ |
107 | +---+ +----------+ +---+ |
108 +--------------------------+
110 Yes, the number "four" is fixed. In total, you can only have five open
111 windows with this layout. Additional windows are not managed and set to
112 floating mode. **This is intentional**.
114 You can set the order of the four auxiliary windows. This is the default
117 lain.layout.centerwork.top_left = 0
118 lain.layout.centerwork.top_right = 1
119 lain.layout.centerwork.bottom_left = 2
120 lain.layout.centerwork.bottom_right = 3
122 This means: The bottom left slot will be occupied by the third window
123 (not counting the main window). Suppose you want your windows to appear
126 +--------------------------+
127 | +---+ +----------+ +---+ |
131 | +---+ | MAIN | +---+ |
136 | +---+ +----------+ +---+ |
137 +--------------------------+
139 This would require you to use these settings:
141 lain.layout.centerwork.top_left = 3
142 lain.layout.centerwork.top_right = 0
143 lain.layout.centerwork.bottom_left = 2
144 lain.layout.centerwork.bottom_right = 1
146 *Please note:* If you use Awesome's default configuration, navigation in
147 this layout may be very confusing. How do you get from the main window
148 to satellite ones depends on the order in which the windows are opened.
149 Thus, use of `awful.client.focus.bydirection()` is suggested.
152 globalkeys = awful.util.table.join(
154 awful.key({ modkey }, "j",
156 awful.client.focus.bydirection("down")
157 if client.focus then client.focus:raise() end
159 awful.key({ modkey }, "k",
161 awful.client.focus.bydirection("up")
162 if client.focus then client.focus:raise() end
164 awful.key({ modkey }, "h",
166 awful.client.focus.bydirection("left")
167 if client.focus then client.focus:raise() end
169 awful.key({ modkey }, "l",
171 awful.client.focus.bydirection("right")
172 if client.focus then client.focus:raise() end
180 I do a lot of work on terminals. The common tiling algorithms usually
181 maximize windows, so you'll end up with a terminal that has about 200
182 columns or more. That's way too much. Have you ever read a manpage in a
183 terminal of this size?
185 This layout restricts the size of each window. Each window will have the
186 same width but is variable in height. Furthermore, windows are
187 left-aligned. The basic workflow is as follows (the number above the
188 screen is the number of open windows, the number in a cell is the fixed
192 +---+---+---+ +---+---+---+ +---+---+---+
193 | | | | | | | | | | | |
194 | 1 | | | -> | 2 | 1 | | -> | 3 | 2 | 1 | ->
195 | | | | | | | | | | | |
196 +---+---+---+ +---+---+---+ +---+---+---+
199 +---+---+---+ +---+---+---+ +---+---+---+
200 | 4 | | | | 5 | 4 | | | 6 | 5 | 4 |
201 +---+---+---+ -> +---+---+---+ -> +---+---+---+
202 | 3 | 2 | 1 | | 3 | 2 | 1 | | 3 | 2 | 1 |
203 +---+---+---+ +---+---+---+ +---+---+---+
205 The first client will be located in the left column. When opening
206 another window, this new window will be placed in the left column while
207 moving the first window into the middle column. Once a row is full,
208 another row above it will be created.
210 Default number of columns and rows are respectively taken from `nmaster`
211 and `ncol` values in `awful.tag`, but you can set your own.
213 For example, this sets `termfair` to 3 columns and at least 1 row:
215 lain.layout.termfair.nmaster = 3
216 lain.layout.termfair.ncol = 1
218 uselessfair, uselesspiral & uselesstile
219 ---------------------------------------
220 These are duplicates of the stock `fair`, `spiral` and `tile` layouts.
222 However, "useless gaps" (see below) have been added.
227 Useless gaps are gaps between windows. They are "useless" because they
228 serve no special purpose despite increasing overview. I find it easier
229 to recognize window boundaries if windows are set apart a little bit.
231 The `uselessfair` layout, for example, looks like this:
245 All of lain layouts provide useless gaps. To set the width of the gaps,
246 you have to add an item called `useless_gap_width` in your `theme.lua`.
247 If it doesn't exist, the width will default to 0.
250 theme.useless_gap_width = "5"
252 What about layout icons?
253 ========================
255 They are located in ``lain/icons/layout``.
257 To use them, add lines to your ``theme.lua`` like this:
259 theme.lain_icons = os.getenv("HOME") .. "/.config/awesome/lain/icons/layout/default/"
260 theme.layout_termfair = theme.lain_icons .. "termfairw.png"
261 theme.layout_cascade = theme.lain_icons .. "cascadew.png"
262 theme.layout_cascadetile = theme.lain_icons .. "cascadetilew.png"
263 theme.layout_centerwork = theme.lain_icons .. "centerworkw.png"
265 Credits goes to [Nicolas Estibals](https://github.com/nestibal) for creating
266 layout icons for default theme.
268 You can use them as a template for your custom versions.
270 [<- home](https://github.com/copycat-killer/lain/wiki)