[xmonad] darcs patch: X.L.MouseResizableTile: configurable
gaps (dragger siz...
Adam Vogt
vogt.adam at gmail.com
Thu Apr 15 11:48:28 EDT 2010
Hello Tomas,
See suggestions inline:
* On Thursday, April 15 2010, Tomas Janousek wrote:
>Hello,
>
>as agreed upon on IRC, here's the patch to optionally get rid of the gaps in
>MRT. It looks a bit ugly, though -- ideas for improvement welcome.
>
>1 patch for repository http://code.haskell.org/XMonadContrib:
>
>Thu Apr 15 13:25:29 CEST 2010 Tomas Janousek <tomi at nomi.cz>
> * X.L.MouseResizableTile: configurable gaps (dragger size and position)
>
> (with the option of putting the draggers over window borders with no gaps at
> all)
>
It isn't clear from the haddocks that you can set draggerType like:
mouseResizableTileNoGaps = mouseResizableTile { draggerType = BordersDragger }
As all you get is:
] draggerType :: MouseResizableTile a -> DraggerType
>+data DraggerType = FixedDragger DraggerGeometry | BordersDragger
>+ deriving (Show, Read)
>+type DraggerGeometry = (Position, Dimension, Position, Dimension)
Could this be a data type with labeled fields? It isn't clear what each
dimension means (the first two are additional gaps, and the second two are the
size of the clickable area?). One alternative (use better label names,
and note that I've reordered the fields):
>+-- | specifies the size of the clickable areas between windows
>+data DraggerType = FixedDragger { pos1, pos2 :: Position, dim1, dim2 :: Dimension }
>+ | BordersDragger -- ^ adds no additional gaps
>+ deriving (Show, Read)
> mrtFraction = 0.5
> mrtDelta :: Rational
> mrtDelta = 0.03
Make these constants parameters too, like Tall has currently.
Unrelated to your patch, I think it makes sense to get rid of:
] mouseResizableTileMirrored
in favor of:
] mouseResizableTile { isMirrored = True }
Now that we have to document that mouseResizableTile has a number of named
fields.
--
Adam
More information about the xmonad
mailing list