[xmonad] How to make floats stay always on top?
Leo Alekseyev
dnquark at gmail.com
Wed Dec 9 09:35:29 EST 2009
Hi All,
I have trouble forcing floating windows (for instance, docks or
cairo-clock) to always stay on top. That is, they stay on top until
another floating window pops up, e.g. any Firefox dialog, or a window
that I'm forcing to float with M-Button1. To reproduce: put only code
from Layout.Monitor example page into the config file (below), start
cairo-clock, go to Firefox and choose "save as", then click cancel.
cairo-clock will disappear into the background. Is there a way to fix
this?..
Thanks,
--Leo
import XMonad
import XMonad.Layout.LayoutModifier
import XMonad.Layout.Monitor
clock = monitor {
-- Cairo-clock creates 2 windows with the same classname, thus
also using title
prop = ClassName "Cairo-clock" `And` Title "MacSlow's Cairo-Clock"
-- rectangle 150x150 in lower right corner, assuming 1280x800 resolution
, rect = Rectangle (1280-150) (800-150) 150 150
-- avoid flickering
, persistent = True
-- make the window transparent
, opacity = 0.6
-- hide on start
, visible = False
-- assign it a name to be able to toggle it independently of others
, name = "clock"
}
myLayouts = ModifiedLayout clock $ tiled ||| Mirror tiled ||| Full
where
tiled = Tall nmaster delta ratio
nmaster = 1
ratio = 1/2
delta = 3/100
main = do
xmonad $ defaultConfig {
manageHook = manageMonitor clock
, layoutHook = myLayouts
}
More information about the xmonad
mailing list