linuxhaskellxmonadxmobar

XMobar is hidden on first XMonad workspace


I installed XMonad and XMobar with configured settings. When I start XMonad a XMobar on any without first workspace is dock and opened programs have place below XMobar, but on first workspace when I open any program XMobar become hidden. These are my XMonad and XMobar configs:

--XMonad:
import XMonad
import XMonad.Util.Run(spawnPipe)
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
main = do
    xmproc <- spawnPipe "xmobar ~/.xmobarrc"
    xmonad $ defaultConfig
        {  manageHook = manageDocks <+> manageHook defaultConfig
        , layoutHook = avoidStruts $ layoutHook defaultConfig
        , logHook = dynamicLogWithPP xmobarPP
                        { ppOutput = hPutStrLn xmproc
                        , ppTitle = xmobarColor "green" "" . shorten 50 
                        }
        , borderWidth = 2
        , terminal = "terminator"
        , normalBorderColor = "#cccccc"
        , focusedBorderColor = "#cd8b00"        
        }
--XMobar:
Config { font = "-misc-fixed-*-*-*-*-33-*-*-*-*-*-*-*"
    , bgColor = "black"
    , fgColor = "grey"
    , position = TopW L 90
    , commands = [ Run Cpu ["-L","3","-H","50",
                               "--normal","green","--high","red"] 10
                     , Run Memory ["-t","Mem: <usedratio>%"] 10
                     , Run Swap [] 10
                     , Run Com "uname" ["-s","-r"] "" 36000
                     , Run Date "%a %b %_d %Y %H:%M:%S" "date" 10
                     , Run Com "~/.xmonad/batt" [] "" 300
                     , Run StdinReader
                     ]
    , sepChar = "%"
    , alignSep = "}{"
    , template = "%StdinReader% }{ %cpu% | %memory% | %.xmonad/batt% | <fc=#ee9a00>%date%</fc>"
    }

Solution

  • I had the same issue with xmobar v0.24 and xmonad v0.12. I also experienced the problem on all workspaces when quickly recompiling twice (meta-q). I fixed this by setting overrideRedirect to False in my .xmobarrc.

    overrideRedirect

    If you're running xmobar in a tiling window manager, you might need to set this option to False so that it behaves as a docked application. Defaults to True.