How do I prevent Xmobar from hiding behind other Xmonad windows?

StackOverflow https://stackoverflow.com/questions/13867197

  •  07-12-2021
  •  | 
  •  

سؤال

EDIT: It turns out my problem was just a temporary bug in Xmobar. See the accepted answer.

There are lots of solutions to this on Google, and almost none of them are working for me. I'm setting up an Arch system, so my first inclination is to use the config on the Arch wiki. Here's mine:

import XMonad
import XMonad.Hooks.DynamicLog

main = xmonad =<< xmobar defaultConfig { terminal = "gnome-terminal" }

Without an xmobarrc (or with any I've tried to copy), xmobar is visible in the empty workspace, but opening any application covers it up completely. Trying to toggle the bar space with Alt-b doesn't bring it back. I've also tried copying John Goerzen's config files verbatim, and that doesn't work either.

The one hack that has worked (from John Goerzen) is to start trayer in my xinitrc. When trayer is running, somehow it successfully reserves space at the top of the screen, which xmobar can also use. But I'd like to get xmobar working by itself. Thanks for any suggestions.

هل كانت مفيدة؟

المحلول

Solved by OODavo on the #xmonad IRC channel. Turns out the latest xmobar package on Arch (0.16-3) simply has a bug in it that breaks the avoidStruts layout. The workaround is either to downgrade to the previous version, or to build the latest version from git.

Previous version of the package: http://arm.konnichi.com/2012/12/02/community/os/x86_64/xmobar-0.16-1-x86_64.pkg.tar.xz

Instructions for downgrading packages in Arch: https://wiki.archlinux.org/index.php/Downgrading_Packages#How_to_downgrade_a_package

نصائح أخرى

I am using xmonad with xmobar on ubuntu and it works as expected.

I have the following configuration in xmonad.hs

manageHook  = manageDocks <+> manageHook defaultConfig
layoutHook  = avoidStruts $ layoutHook defaultConfig

my xmobarrc has custom configuration, but nothing specific to alignment.

My xmonad version is 0.11 and xmobar version is 0.18

I dont start xmobar automatically on system startup, I prefer to start it up manually and after it starts, all other windows politely make space for xmobar status bar.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top