sivakov512
sivakov512

Reputation: 415

Xmobar not visible when using with Xmonad

Today I've started with Xmonad and can not get Xmobar to be visible on top of layouts At my .xmobarrc I has these code:

...
   , position =     TopW L 100
   , lowerOnStart =     True
   , hideOnStart =      False
   , allDesktops =      True
   , overrideRedirect = True
   , pickBroadest =     False
   , persistent =       True

...

And this is my xmonad.hs:

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

main = do
  xmproc <- spawnPipe "xmobar"
  xmonad $ defaultConfig
    { manageHook = manageDocks <+> manageHook defaultConfig
    , layoutHook = avoidStruts  $  layoutHook defaultConfig
    , logHook = dynamicLogWithPP xmobarPP
                    { ppOutput = hPutStrLn xmproc
                    , ppTitle = xmobarColor "green" "" . shorten 50
                    }
    , terminal = "urxvt"
    , modMask = mod4Mask
    }

Xmobar is running with Xmonad but it's not visible. How can I solve it? I need that Xmobar always be visible at the top of monitor.

Upvotes: 6

Views: 5534

Answers (2)

bbarker
bbarker

Reputation: 13088

Although many of the other solutions posted are also important, I had to add lowerOnStart = False to .xmobarrc, so it isn't sent to the bottom of the window stack on start.

Upvotes: 0

sivakov512
sivakov512

Reputation: 415

Solution founded at https://unix.stackexchange.com/questions/288037/

I add this handleEventHook = handleEventHook defaultConfig <+> docksEventHook and now Xmobar always visible.

Upvotes: 9

Related Questions