A layout like the tall layout, except that master area windows are in columns

695 views Asked by At

Is there a way to create a layout similar to a tall layout, except when you add more windows to the master pane, it orders them by columns rather than rows?

1

There are 1 answers

1
deshtop On BEST ANSWER

I don't have a definitive answer, but i use something similar for viewing PDF files, either one or two columns with slave on the right side (if there are slave windows).

import XMonad.Layout.ResizableTile
import XMonad.Layout.GridVariants
...
myPDFLayout = myPDFLayout1 ||| myPDFLayout2
myPDFLayout1 = ResizableTall 1 (3/100) (7/8) []
myPDFLayout2 = SplitGrid L 1 2 (7/8) (16/10) (3/100)

Feel free to add more columns - i guess SplitGrid can be used for three or more columns as well, find the details in the documentation. If you don't know already check out the xmonad contribs, they provide quite a few different layouts, for example the two above.

Those layouts are per default changed with mod-Space. You could rebind them on specific workspaces like

((modMask, xK_comma), bindOn [("PDF", sendMessage NextLayout)])

but as far as i know there is nothing like PrevLayout, and it will cycle through the layouts rather then stopping.

edit: I thought there was a thread on SO about cycling backwards, but i was wrong (haven't read or tested this though)