Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 365
sivakov512 Avatar asked Jun 13 '17 16:06

sivakov512


1 Answers

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

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

like image 67
sivakov512 Avatar answered Oct 05 '22 22:10

sivakov512