diff options
author | Paul Fertser <fercerpav@gmail.com> | 2013-02-22 08:22:32 +0100 |
---|---|---|
committer | Paul Fertser <fercerpav@gmail.com> | 2013-02-22 08:22:32 +0100 |
commit | ce8caa14c9ff7e18f89cab0897cd522004e736f2 (patch) | |
tree | ef4049a06c0b3216dc9fd1de2217ef15a696d8de /XMonad/Layout | |
parent | 399afdab6d068dc2f17f9c05156c6dce8cb64284 (diff) | |
download | XMonadContrib-ce8caa14c9ff7e18f89cab0897cd522004e736f2.tar.gz XMonadContrib-ce8caa14c9ff7e18f89cab0897cd522004e736f2.tar.xz XMonadContrib-ce8caa14c9ff7e18f89cab0897cd522004e736f2.zip |
Allow to specify the initial gaps' states in X.L.Gaps
Ignore-this: 31596d918d0050e36ce3f64f56205a64
darcs-hash:20130222072232-52607-94c6527828fc9414be84cae7839889ccd656cd03.gz
Diffstat (limited to '')
-rw-r--r-- | XMonad/Layout/Gaps.hs | 7 |
1 files changed, 6 insertions, 1 deletions
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]) |