From ce8caa14c9ff7e18f89cab0897cd522004e736f2 Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Fri, 22 Feb 2013 08:22:32 +0100 Subject: Allow to specify the initial gaps' states in X.L.Gaps Ignore-this: 31596d918d0050e36ce3f64f56205a64 darcs-hash:20130222072232-52607-94c6527828fc9414be84cae7839889ccd656cd03.gz --- XMonad/Layout/Gaps.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'XMonad') diff --git a/XMonad/Layout/Gaps.hs b/XMonad/Layout/Gaps.hs index d4edd10..86243b5 100644 --- a/XMonad/Layout/Gaps.hs +++ b/XMonad/Layout/Gaps.hs @@ -29,7 +29,7 @@ module XMonad.Layout.Gaps ( -- * Usage -- $usage Direction2D(..), Gaps, - GapSpec, gaps, GapMessage(..) + GapSpec, gaps, gaps', GapMessage(..) ) where @@ -140,3 +140,8 @@ gaps :: GapSpec -- ^ The gaps to allow, paired with their initial sizes. -> ModifiedLayout Gaps l a gaps g = ModifiedLayout (Gaps g (map fst g)) +-- | Add togglable manual gaps to a layout, explicitly specifying the initial states. +gaps' :: [((Direction2D,Int),Bool)] -- ^ The gaps to allow and their initial states. + -> l a -- ^ The layout to modify. + -> ModifiedLayout Gaps l a +gaps' g = ModifiedLayout (Gaps (map fst g) [d | ((d,_),v) <- g, v]) -- cgit v1.2.3