πΎ Archived View for gemini.dimakrasner.com βΊ two-weeks-with-the-snail.gmi captured on 2023-06-14 at 13:57:36. Gemini links have been rewritten to link to archived content
β¬ οΈ Previous capture (2023-01-29)
β‘οΈ Next capture (2023-07-22)
-=-=-=-=-=-=-
The "snail" layout is an alternative layout for dwl, for:
It's been more than two weeks since the time I started using the snail layout as my daily driver. It works very well for me and I think I've learned how to use it. This post describes how I use the snail layout and new users will probably find it useful.
In all illustrations, the master area is filled with β, while the stack area is filled with β. It's a 16:9 screen with nmaster=1 and mfact=0.64, which means the master area is about 2/3 of the screen and contains only one window. Therefore, with two windows, it looks like this:
βββββββββββββββββββββββ¬βββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββmasterβββββββββββstackββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββ΄βββββββββββ
The snail layout is based on the idea of two spirals:
ββββββββββββ¬βββββββββββ¬βββββββββββ βββββββββββ¬βββββββββββ¬βββββββββββ ββββββββββββͺββββββββββββββββββββββ ββββββββββββββββββββββͺβββββββββββ ββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ ββββββββββββββββββ¬ββββ«βΌβββββ¬βββββ«β€ βββββββ¬βββ«βββββββββββββββββ¬βββββ«β€ ββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ βββββββββββββ«βββββ€ββββββ«ββββ€ββββββ ββ«βββββ€ββββββββββββββββ«ββββ€ββββββ ββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ ββββββββββββββββββͺββββββββββͺββββββ βββββββͺββββββββββββββββββββͺββββββ ββββββββββββ΄ββββββ΄βββββ΄βββββ΄ββββββ βββββββ΄ββββ΄βββββββββββ΄βββββ΄ββββββ
For example, if the master area has only one window, all windows are added to the stack area and this is what happens:
βββββββββββββββββββββββ¬βββββββββββ βββββββββββββββββββββββ¬βββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββ2ββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ€ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ β2βββββββββββββββββββββ1ββββββββββ β3βββββββββββββββββββββ1ββββββββββ βββββββββββββββββββββββ΄βββββββββββ βββββββββββββββββββββββ΄βββββββββββ βββββββββββββββββββββββ¬βββββββββββ βββββββββββββββββββββββ¬βββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββ3ββββββββββ βββββββββββββββββββββββ4ββββββββββ ββββββββββββββββββββββββββββ¬ββββββ€ ββββββββββββββββββββββββββββ¬ββββββ€ ββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββ1ββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ€ββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ β4βββββββββββββββββββββ1ββββ2βββββ β5βββββββββββββββββββββ2ββββ3βββββ βββββββββββββββββββββββ΄βββββ΄ββββββ βββββββββββββββββββββββ΄βββββ΄ββββββ βββββββββββββββββββββββ¬βββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββ5ββββββββββ βββββββββββββββββββββββββ¬βββ¬ββββββ€ βββββββββββββββββββββββ2β1ββββββββ βββββββββββββββββββββββββ΄βββ€ββββββ ββββββββββββββββββββββββββββββββββ β6βββββββββββββββββββββ3ββββ4βββββ βββββββββββββββββββββββ΄βββββ΄ββββββ
(The ASCII art is not perfect, because the "resolution" is small: for example, in reality, windows 1 and 2 have the same dimensions.)
Every time a window is closed, the stack "spirals" in counter-clockwise motion and windows 2 expands to fill the space previously occupied by window 1.
The key bindings used in this guide are mostly the dwl defaults, but with Super instead of Alt:
Let's say you want to put windows 6 and 5 side by side:
βββββββββββββββββββββββ¬βββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββ5ββββββββββ βββββββββββββββββββββββββ¬βββ¬ββββββ€ βββββββββββββββββββββββ2β1ββββββββ βββββββββββββββββββββββββ΄βββ€ββββββ ββββββββββββββββββββββββββββββββββ β6βββββββββββββββββββββ3ββββ4βββββ βββββββββββββββββββββββ΄βββββ΄ββββββ
Press Super+i: this moves window 5 to the master area, which now contains two windows. Window 6 is split horizontally because it's a wide window. Therefore, the result is:
ββββββββββββ¬βββββββββββ¬βββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββ4ββββββββββ ββββββββββββββββββββββββββββ¬ββββββ€ βββββββββββββββββββββββ1ββββββββββ ββββββββββββββββββββββββββββ€ββββββ ββββββββββββββββββββββββββββββββββ β6ββββββββββ5ββββββββββ2ββββ3βββββ ββββββββββββ΄βββββββββββ΄βββββ΄ββββββ
This is by far the most common layout for me, and it's only one keystroke away from the starting point.
There's a second, more flexible but less convenient way to achieve a similar layout: repeated Super+h, until the stack area becomes wide:
βββββββββββββββ¬βββββββββ¬βββββββββ βββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββ4ββββββββ βββββββββββββββββββββββββββββ¬ββββ€ ββββββββββββββββββββββββ1ββββββββ βββββββββββββββββββββββββββββ€ββββ βββββββββββββββββββββββββββββββββ β6βββββββββββββ5ββββββββ2ββββ3βββ βββββββββββββββ΄βββββββββ΄βββββ΄ββββ
Window 5 is split horizontally (because it's wide), so you get one tall window in the master area and another in the stack, but they don't have the same dimensions.
You can use Super+h and Super+l to make window 5 wider or narrower, at the expense of window 6:
ββββββββββββ¬βββββββββββ¬βββββββββββ ββββββββββ¬ββββββββββββ¬ββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββ4ββββββββββ ββββββββββοΏ½οΏ½βββββββββββ4βββββββββββ ββββββββββββββββββββββββββββ¬ββββββ€ ββββββββββββββββββββββββββββ¬ββββββ€ βββββββββββββββββββββββ1ββββββββββ ββββββββββββββββββββββ1βββββββββββ ββββββββββββββββββββββββββββ€ββββββ ββββββββββββββββββββββββββββ€ββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ β6ββββββββββ5ββββββββββ2ββββ3βββββ β6ββββββββ5βββββββββββ2βββββ3βββββ ββββββββββββ΄βββββββββββ΄βββββ΄ββββββ ββββββββββ΄ββββββββββββ΄ββββββ΄ββββββ
But, you still don't have complete freedom, because window 5 occupies the left half of the space dedicated to the stack area: to make window 5 wider, you must give more space to the windows in the right half of the stack area, too. Sometimes, that's a waste of precious screen real estate.
Also, after several Super+l, window 5 is split vertically instead of horizontally, because the stack area becomes narrow:
ββββββββββββββββ¬ββββββββββββββββ ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ ββββββββββββββββ5βββββββββββββββ ββββββββββββββββββββ¬ββββ¬ββββββββ€ ββββββββββββββββ2βββ1βββββββββββ ββββββββββββββββββββ΄ββββββββββββ ββββββββββββββββββββββββββββββββ β6ββββββββββββββ3βββββββ4βββββββ ββββββββββββββββ΄ββββββββ΄ββββββββ
This means it's a bad idea to abuse the stack area for large windows: unlike the master area, it emphasizes compactness. Therefore, my recommendation is to put the big windows in the master area: press Super+i n-1 times, if you want n big windows. Then, repeatedly press Super+l until they're placed side-by-side and have the same width. This is much easier (and less keystrokes) than abusing the algorithm to place window 5 from the stack area alongside window 6.
Often, it's impossible. If you press Super+i twice (so you have 3 windows in the master area), window 5 gets split vertically, because the master area is running out of horizontal space:
ββββββββββββ¬βββββββββββ¬βββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββ5ββββββββββ3ββββββββββ βββββββββββββββββββββββΌβββββ¬ββββββ€ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ β6ββββββββββ4ββββββββββ1ββββ2βββββ ββββββββββββ΄βββββββββββ΄βββββ΄ββββββ
Most of the time, I focus on one or two applications (a browser or a text editor and a browser), and everything else (like the IRC client) is packed neatly in the stack area. Therefore, I'm fine with this limitation. I tried to tune the formula to allow 3 tall windows in the master area even with a 16:9 monitor, but they're just too narrow. A high-resolution display doesn't help, because many UIs (especially IDEs with sidebars) don't work well when they're so narrow.
I find the snail layout very nice to use when I combine it with "workspaces". I have one tag with my coding setup (text editor, browser, IRC client, two general-use terminals) and another for everything else (audio mixer, Bluetooth settings, etc'). The former has room for two tall windows in the master area, and the latter is always a mess with "temporary" windows I forgot to close, and changes constantly.
With a very wide monitor (say, 21:9), heavier multi-taskers can achieve something like this:
ββββββββββββββββ¬βββββββββ¬βββββββββ¬βββββββββββ βββββββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ3ββββββββββ βββββββββββββββββββββββββββββββββββββββ¬ββββββ€ βββββββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββ β6ββββββββββββββ5ββββββββ4ββββββββ1ββββ2βββββ ββββββββββββββββ΄βββββββββ΄βββββββββ΄βββββ΄ββββββ
However, even a 21:9 monitor has its limits, and it won't be able to fit four windows side-by-side: window 4 will split vertically after another Super+i.
(9 windows would look more like a snail, I guess.)
One Super+i and several Super+h, until the master area takes 50% of the screen, will give you this:
βββββββββββββββββ¬βββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ β4βββββββββββββββ2ββββββββββββββββ βββββββββββββββββΌβββββββββββββββββ€ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ β3βββββββββββββββ1ββββββββββββββββ βββββββββββββββββ΄βββββββββββββββββ
Or this, if you have more windows:
βββββββββββββββββ¬βββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ β7βββββββββββββββ5ββββββββββββββββ βββββββββββββββββΌββββ¬ββββ¬βββββββββ€ βββββββββββββββββ2βββ1ββββββββββββ βββββββββββββββββββββ΄ββββ€βββββββββ ββββββββββββββββββββββββββββββββββ β6βββββββββββββββ3βββββββ4ββββββββ βββββββββββββββββ΄ββββββββ΄βββββββββ
If you want to fit many windows on the screen and divide them equally between the two areas, press Super+i multiple times:
βββββββββββββββββ¬βββββββββββββββ ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ β10ββββββββββββββ5ββββββββββββββ βββββ¬ββββ¬ββββββββΌββββ¬ββββ¬βββββββ€ β7βββ6βββββββββββ2βββ1ββββββββββ βββββ΄ββββ€ββββββββββββ΄ββββ€βββββββ ββββββββββββββββββββββββββββββββ β8βββββββ9βββββββ3βββββββ4ββββββ βββββββββ΄ββββββββ΄ββββββββ΄βββββββ
If you make the master area wider using Super+l, window 10 becomes tall:
βββββββββββ¬ββββββββββ¬βββββββββββ ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ βββββββββββ9βββββββββ5ββββββββββ ββββββββββββββββ¬βββββΌβββ¬βββ¬βββββ€ βββββββββββ6βββββββββ2ββ1βββββββ ββββββββββββββββ€ββββββββ΄βββ€βββββ ββββββββββββββββββββββββββββββββ β10ββββββββ7ββββ8ββββ3βββββ4ββββ βββββββββββ΄βββββ΄βββββ΄ββββββ΄βββββ
This layout is nice if you have many windows and use windows 10, 9 and 5 often. I think I used this layout twice, when I needed to copy-paste stuff between two windows and already had many open windows.
Otherwise, if you make the master area narrower using Super+h, window 6 becomes tall:
βββββββββ¬βββββββββββ¬ββββββββββββ ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ β10βββββββββββββββββ5βββββββββββ βββββ¬ββββ€ββββββββββββββ¬βββ¬ββββββ€ β7ββββββββββββββββββ2ββ1ββββββββ βββββββββββββββββββββββ΄βββββββββ ββββββββββββββββββββββββββββββββ β8βββ9βββ6ββββββββββ3ββββββ4ββββ βββββ΄ββββ΄βββββββββββ΄ββββββ΄ββββββ
This layout is useful if you want to focus on one centered window, and don't mind wasting some horizontal space on the right. I think I used this layout only once, when I needed to focus on window 6 and didn't want to reorder the windows.
The snail layout could be the one for you, if you want to spend most of your time in these layouts:
βββββββββββββββββββββββ¬βββββββββββ ββββββββββββ¬βββββββββββ¬βββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββ5ββββββββββ βββββββββββββββββββββββ4ββββββββββ ββββββββββββββββββββββββββ¬ββ¬ββββββ€ ββββββββββββββββββββββββββββ¬ββββββ€ βββββββββββββββββββββββ2ββ1βββββββ βββββββββββββββββββββββ1ββββββββββ ββββββββββββββββββββββββββ΄ββ€ββββββ ββββββββββββββββββββββββββββ€ββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ β6βββββββββββββββββββββ3ββββ4βββββ β6ββββββββββ5ββββββββββ2ββββ3βββββ βββββββββββββββββββββββ΄βββββ΄ββββββ ββββββββββββ΄βββββββββββ΄βββββ΄ββββββ ββββββββββββ¬βββββββββββ¬βββββββββββ βββββββββββββββββ¬βββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ βοΏ½οΏ½ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββ5ββββββββββ3ββββββββββ β6βββββββββββββββ4ββββββββββββββββ βββββββββββββββββββββββ€βββββ¬ββββββ€ βββββββββββββββββΌββββββββ¬βββββββββ€ ββββββββββββββββββββββββββββββββββ βββββββββββββββββ1ββββββββββββββββ ββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββ€βββββββββ ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ β6ββββββββββ4ββββββββββ1ββββ2βββββ β5βββββββββββββββ2βββββββ3ββββββββ ββββββββββββ΄βββββββββββ΄βββββ΄ββββββ βββββββββββββββββ΄ββββββββ΄βββββββββ
To use it "correctly":
The snail layout is exactly what I was looking for, and it works very well for me. The snail layout can do more things, but I rarely use that extra flexibility, and don't mind it.