darcs patch: X.L.MouseResizableTile: configurable gaps (dragger siz...

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

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
* 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

Hello Adam, On Thu, Apr 15, 2010 at 11:48:28AM -0400, Adam Vogt wrote:
See suggestions inline:
Thanks for the suggestions. I'm attaching a two patch bundle that should be better :-).
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.
The attached patches make the second variant possible, but don't remove the first one yet. It would make sense to do so, if others agree. I do. Regards, -- Tomáš Janoušek, a.k.a. Liskni_si, http://work.lisk.in/

* On Thursday, April 15 2010, Tomáš Janoušek wrote:
Hello Adam,
On Thu, Apr 15, 2010 at 11:48:28AM -0400, Adam Vogt wrote:
See suggestions inline:
Thanks for the suggestions. I'm attaching a two patch bundle that should be better :-).
..
Regards, -- Tomáš Janoušek, a.k.a. Liskni_si, http://work.lisk.in/
Applied, thanks! -- Adam

This 2-patches bundle was just applied to http://code.haskell.org/XMonadContrib:
20100415213813 Tomas Janousek
participants (4)
-
Adam Vogt
-
darcswatch@nomeata.de
-
Tomas Janousek
-
Tomáš Janoušek