2

For some reason, my xmonad config won't launch xmobar, but it doesn't throw any errors, and the command xmobar launches it fine. Here is my xmobar.hs

 import XMonad
 import XMonad.Hooks.ManageDocks
 import XMonad.Hooks.DynamicLog
 import XMonad.Util.Run(spawnPipe)

 main = do
     xmproc <- spawnPipe "xmobar"
     xmonad $ defaultConfig
         { terminal    = "terminator"
         , layoutHook = avoidStruts $ layoutHook defaultConfig
         , manageHook=manageHook defaultConfig <+> manageDocks
         , logHook = dynamicLogWithPP $ sjanssenPP { ppOrder = reverse }
         , borderWidth = 1
         }
  • Does it work withe the full path? Eg., xmproc <- spawnPipe "xmobar ~/.xmobar.hs" – jasonwryan Jul 21 '14 at 21:32
  • Doesn't appear to make a difference. – Natecat Jul 21 '14 at 21:34
  • You are also using manageDocks, so perhaps you need the -d (start as dock) option to see it ? – Leiaz Jul 21 '14 at 22:02
3

It closes immediately because you aren't sending anything to it. You need to specify the output for the pretty print :

    dynamicLogWithPP $ sjanssenPP {ppOutput = hPutStrLn xmproc},

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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