[xmonad] insertPosition and transient floating windows
Peter Jones
mlists at pmade.com
Fri Nov 6 20:19:40 UTC 2015
Peter Jones <mlists at pmade.com> writes:
> I'm using `insertPosition Below Newer` with `composeOne`. When a
> password dialog appears, and the master window previously had the focus,
> the dialog gets focused and is put in the center of the screen. That
> part is perfect.
>
> The problem comes when I dismiss the dialog. At that point I would
> expect the master window to regain focus, but one of the slave windows
> does instead. Of course, removing `insertPosition` fixes my issue.
I was finally able to write a configuration to get insertPosition to
work the way I want. I moved all my manage hooks into composeOne and
added the transience manage hook. Here is my final manage hook:
manageHook :: ManageHook
manageHook = manageDocks <> composeOne
[ -- Some application windows ask to be floating (I'm guessing) but
-- it's stupid to float them.
title =? "HandBrake" -?> normalTile
-- HandBrake file dialog asks for crazy sizes.
, className =? "Handbrake" <&&> isDialog -?> forceCenterFloat
-- Force dialog windows and pop-ups to be floating.
, isDialog -?> doCenterFloat
, stringProperty "WM_WINDOW_ROLE" =? "pop-up" -?> doCenterFloat
, className =? "Gcr-prompter" -?> doCenterFloat
, transience -- Move transient windows to their parent.
-- Tile all other windows using insertPosition.
, pure True -?> normalTile
]
where
normalTile = insertPosition Below Newer
--
Peter Jones, Founder, Devalot.com
Defending the honor of good code
More information about the xmonad
mailing list