[xmonad] Autohiding of the Gnome-Panel
julien steinhauser
Julien.Steinhauser at orange.fr
Thu Feb 11 13:52:35 EST 2010
On Thu, Feb 11, 2010 at 07:34:27PM +0100, Ralph Hofmann wrote:
>
> I use xmonad and Gnome and I would like to use a gnome-panel with
> autohiding. But with autohiding the gnome-panel stays always behind the
> windows and can't be accessed. A google search only showed me a rather
> old bug report. I've tried avoidStruts from XMonad-Hooks-ManageDocks,
> but it didn't help.
>
> Is there a solution?
>
Yes, while searching something similar to setup an environnement
for my girlfriend I had found the following in the mailing list archive
but I didn't wrote down the original author name, sorry...
In ManageDocks.hs go to line 128 and substitute :
struts <- (filter careAbout . concat) `fmap` mapM getStrut wins
-- we grab the window attributes of the root window rather than checking
-- the width of the screen because xlib caches this info and it tends to
-- be incorrect after RAndR
wa <- io $ getWindowAttributes dpy rootw
let screen = r2c $ Rectangle (fi $ wa_x wa) (fi $ wa_y wa) (fi $ wa_width wa) (fi $ wa_height wa)
return $ \r -> c2r $ foldr (reduce screen) (r2c r) struts
where careAbout (s,_,_,_) = s `S.member` ss
with :
(strutWins,struts) <- do
stss <- mapM getStrut wins
let (ws, s) = unzip [ (w,st) | (w,sts) <- zip wins stss, st <- sts, careAbout st ]
return (unique ws, unique s)
-- move all the struts to the top of X's stacking order.
sequence_ $ map (\w -> io $ raiseWindow dpy w) strutWins
-- we grab the window attributes of the root window rather than checking
-- the width of the screen because xlib caches this info and it tends to
-- be incorrect after RAndR
wa <- io $ getWindowAttributes dpy rootw
let screen = r2c $ Rectangle (fi $ wa_x wa) (fi $ wa_y wa) (fi $ wa_width wa) (fi $ wa_height wa)
return $ \r -> c2r $ foldr (reduce screen) (r2c r) struts
where careAbout (s,_,_,_) = s `S.member` ss
unique [] = []
unique (x:xs) = x : unique (filter (/=x) xs)
and then rebuild your librairies.
It was advised it could break something else in the config
but i don't remember what.
I hope it will help anyway.
More information about the xmonad
mailing list