Discussion:
[xmonad] Default Floating Window Criteria (rdesktop)
Jason Schulz
2016-03-06 01:12:26 UTC
Permalink
I'm trying to figure out why XMonad isn't tiling rdesktop by default (and
hopefully change it). Whenever I launch rdesktop, the window gets floated. I'm
using the default manageHook which, looking at the source, looks like it should
only float two programs by default (MPlayer, and mplayer2).

The command I'm using to launch rdesktop is 'rdesktop -K -a 32 -x lan -g
1920x1080 $host$'. My xmonad.hs is posted on github if anyone wants to look at
it (https://github.com/uxcn/dot-files/blob/master/.xmonad/xmonad.hs). I'm
currently using version 0.12.

Any help is much appreciated. Thanks in advance.

-Jason
Brandon Allbery
2016-03-06 01:26:10 UTC
Permalink
Post by Jason Schulz
I'm trying to figure out why XMonad isn't tiling rdesktop by default (and
hopefully change it). Whenever I launch rdesktop, the window gets floated. I'm
There is also a built-in criterion: if a window declares its default size,
minimum size, and maximum size the same (see WM_NORMAL_HINTS in xprop) then
xmonad floats it because it cannot satisfy a fixed window size with a tile
whose size depends on the tiling algorithm as modified by tabs, struts,
etc. You should be able to override this in the manageHook. If rdesktop is
applying the -geometry option to all three of those sizes then rdesktop
would need to be modified to do something more sensible (but note that it
may be doing that to work around other window managers' behavior!).
--
brandon s allbery kf8nh sine nomine associates
***@gmail.com ***@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
Jason Schulz
2016-03-06 21:05:24 UTC
Permalink
Post by Brandon Allbery
There is also a built-in criterion: if a window declares its default size,
minimum size, and maximum size the same (see WM_NORMAL_HINTS in xprop) then
xmonad floats it because it cannot satisfy a fixed window size with a tile
whose size depends on the tiling algorithm as modified by tabs, struts,
etc.
Thanks Brandon. I thought that might be what's happening. I checked with xprop
and rdesktop does set WM_NORMAL_HINTS.

Is there a simple way to sink a window through manageHook? XMonad.ManageHook
has a doFloat, but no corresponding doSink.

-Jason
Brandon Allbery
2016-03-06 21:08:13 UTC
Permalink
Post by Jason Schulz
Is there a simple way to sink a window through manageHook?
XMonad.ManageHook
has a doFloat, but no corresponding doSink.
import qualified XMonad.StackSet as W

then in the manageHook you can use

doF W.sink

(Things like doFloat are just convenience wrappers for this mechanism;
doFloat is doF W.float.)
--
brandon s allbery kf8nh sine nomine associates
***@gmail.com ***@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
Jason Schulz
2016-03-06 22:52:04 UTC
Permalink
Thanks again.

For posterity, here's what I added to my config.

doSink :: ManageHook
doSink = ask >>= doF . sink

-Jason

Loading...