8

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>"
    }
  • If I understand correctly, only on the first workspace programs will be placed "over" xmobar? I cannot reproduce this with your settings (tested with xterm). I'd guess you start some other kind of window manager along with xmonad. Try if the behaviour is reproducable when starting xmonad from ``~/.xsession`` without any other programs. – deshtop Mar 31 '16 at 23:25
  • I've had the same problems when I recompiled xmonad, after that xmobar was always hidden. – Cirquit May 11 '16 at 15:24
  • I think the status bar will drop below the background image. I dont know a fix any than the hard: "lowerOnStart = False" – Konrad Eisele Jun 04 '16 at 16:02

1 Answers1

7

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.

Community
  • 1
  • 1
Stephen Niedzielski
  • 2,497
  • 1
  • 28
  • 34
  • 4
    I just found out that overrideRedirect may be considered bad practice? This solution works just as well: http://unix.stackexchange.com/a/303242/24690 – Stephen Niedzielski Aug 15 '16 at 23:53