Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm a Haskell and XMonad beginner. I'm trying to set up my tiling layout to allow three side by side columns (so that I can have three simultaneous tall and thin Vim instances for coding, per workspace).

In the docs, I've found a three-column layout function, and even managed to import it and define a custom layout, but I'm not sure how to add it to my layoutHook, which already has some stuff defined from a tutorial I read, to keep my xmobar safe from window covering.

The relevant lines of my xmonad.hs:

import XMonad.Layout.ThreeColumns
threeLayout = ThreeCol 1 (3/100) (1/2)
...
main = do
    xmonad $ defaultConfig
    { manageHook = manageDocks <+> manageHook defaultConfig
    , layoutHook = avoidStruts $ layoutHook defaultConfig
    ...

So this is basically a noob syntax question. How do I change the layoutHook line to keep the existing configs, while also adding my three-column tile layout?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

I simply forget about default config and start defining things on my own. So going that route:

myLayoutHook = avoidStruts(smartBorders(ThreeColumns ||| Circle ||| Grid ||| ANY_OTHER_LAYOUT_YOU_USE)
main = do
    xmonad $ desktopConfig
        { layoutHook = myLayoutHook
        ...

This also has avoidStruts, which seems to be what you want when you say you want to keep the existing config. smartBorders is another nice thing that hides the border when not needed, for example when you have only one window on one screen.

share|improve this answer
    
Ah, I see. Looking at the default config, it is very simple. I've taken your advice, and it's working very well. Thanks! –  ire_and_curses Sep 22 '12 at 5:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.