Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following configuration on xmonad.hs, I really just want to add xmobar to the spawn pipe, but i dont know whats wrong. This is my config:

import XMonad

main = do
    xmproc <- spawnPipe "xmobar &"
    xmonad $ defaultConfig
        { modMask = mod4Mask -- Use Super instead of Alt
        , terminal = "xterm -fg white -bg black"
        -- more changes

And this is the error I get:

xmonad.hs:6:9: parse error on input `{'
share|improve this question
up vote 1 down vote accepted

There is a much simpler way to do this and you can see that in my xmonad config. Essentially the important lines are these ones:

-- put it all together
main = do
    nScreens <- countScreens    -- just in case you are on a laptop like me count the screens so that you can go
    xmonad =<< xmobar myBaseConfig
      { modMask = myModMask

That xmonad there is provided by this line here:

import XMonad.Hooks.DynamicLog (dynamicLogXinerama, xmobar)

You can see the documentation for the xmobar function here.

And using that you should be able to do this for yourself! Cheers. You may also be able to pick up some other tips from my XMonad config so I would suggest that you have a browse.

share|improve this answer

Your Answer


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.