How to make a window floating above all the other windows and border-less?

Hi, I felt that a digital watch at the corner was so in-noticable. So I planned making a clock watch, just three handles, transparent background, in the center of the screen, floating. But I met a few problems here. I made the windows "over-redirect", so it has no border. Well, how to make it floating above all the others then? Normally, I could do this in xmonad's config file, to make THE window floating, which also is above all the other windows. But with "over-redirect", it does not work.... -- 竹密岂妨流水过 山高哪阻野云飞

Excerpts from Magicloud Magiclouds's message of Wed Sep 09 20:45:49 -0600 2009:
But I met a few problems here. I made the windows "over-redirect", so it has no border. Well, how to make it floating above all the others then?
Assuming your window has a property to match in manageHook, (appName used here), and already floats because of fixed size, etc: import XMonad.Actions.NoBorders appName =? "foo" --> (ask >>= \w -> liftX (toggleBorder w) >> idHook) If you need to float it with manageHook, then instead of idHook use doRectFloat or doCenterFloat as appropriate. In darcs there is also Layout.Monitor module with additional tools for such tasks. -- wmw

So you mean I should not use the "over-redirect" X attribute?
On Sat, Sep 12, 2009 at 12:26 AM, Wirt Wolff
Excerpts from Magicloud Magiclouds's message of Wed Sep 09 20:45:49 -0600 2009:
But I met a few problems here. I made the windows "over-redirect", so it has no border. Well, how to make it floating above all the others then?
Assuming your window has a property to match in manageHook, (appName used here), and already floats because of fixed size, etc:
import XMonad.Actions.NoBorders
appName =? "foo" --> (ask >>= \w -> liftX (toggleBorder w) >> idHook)
If you need to float it with manageHook, then instead of idHook use doRectFloat or doCenterFloat as appropriate.
In darcs there is also Layout.Monitor module with additional tools for such tasks.
-- wmw
-- 竹密岂妨流水过 山高哪阻野云飞

On Sep 11, 2009, at 21:31 , Magicloud Magiclouds wrote:
So you mean I should not use the "over-redirect" X attribute?
Override-redirect means "hey window manager, keep your mitts off this window". You should not be surprised when that's what happens. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

Hi,
Thanks for the help. I just modified my xmonad.hs like following.
Well, the doCenterFloat seems working, but the toggleBorder part does
not. The window still has a border, and it could receive focus.
manageHook_ :: ManageHook
manageHook_ = composeAll [ className =? "Clock" --> (do
w <- ask
liftX $ toggleBorder w
doCenterFloat) ]
On Sat, Sep 12, 2009 at 12:26 AM, Wirt Wolff
Excerpts from Magicloud Magiclouds's message of Wed Sep 09 20:45:49 -0600 2009:
But I met a few problems here. I made the windows "over-redirect", so it has no border. Well, how to make it floating above all the others then?
Assuming your window has a property to match in manageHook, (appName used here), and already floats because of fixed size, etc:
import XMonad.Actions.NoBorders
appName =? "foo" --> (ask >>= \w -> liftX (toggleBorder w) >> idHook)
If you need to float it with manageHook, then instead of idHook use doRectFloat or doCenterFloat as appropriate.
In darcs there is also Layout.Monitor module with additional tools for such tasks.
-- wmw
-- 竹密岂妨流水过 山高哪阻野云飞
participants (3)
-
Brandon S. Allbery KF8NH
-
Magicloud Magiclouds
-
Wirt Wolff