aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorLukas Mai <l.mai@web.de>2008-01-18 00:45:50 +0100
committerLukas Mai <l.mai@web.de>2008-01-18 00:45:50 +0100
commit9985952052bbfc577ce279d4cea8d082ae6fe0d4 (patch)
tree88a9d0f79813d6af9546a713b69088ab35fea78f /XMonad
parentf5ddc6418de5ebb540c70bbc755e2410c78ad1d5 (diff)
downloadXMonadContrib-9985952052bbfc577ce279d4cea8d082ae6fe0d4.tar.gz
XMonadContrib-9985952052bbfc577ce279d4cea8d082ae6fe0d4.tar.xz
XMonadContrib-9985952052bbfc577ce279d4cea8d082ae6fe0d4.zip
add 'single' helper function
darcs-hash:20080117234550-462cf-6f662a03c8ff21db0951ac2d61b59f1ff89c8ebf.gz
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Layout/MultiToggle.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/XMonad/Layout/MultiToggle.hs b/XMonad/Layout/MultiToggle.hs
index 3fdbdce..2b6c8a1 100644
--- a/XMonad/Layout/MultiToggle.hs
+++ b/XMonad/Layout/MultiToggle.hs
@@ -23,6 +23,7 @@ module XMonad.Layout.MultiToggle (
Toggle(..),
(??),
EOT(..),
+ single,
mkToggle
) where
@@ -63,7 +64,7 @@ import Data.Maybe
--
-- After changing this to
--
--- > layout = mkToggle (MIRROR ?? EOT) (tiled ||| Full)
+-- > layout = mkToggle (single MIRROR) (tiled ||| Full)
--
-- you can now dynamically apply the 'XMonad.Layout.Mirror' transformation:
--
@@ -90,7 +91,7 @@ import Data.Maybe
-- layout = id
-- . 'XMonad.Layout.NoBorders.smartBorders'
-- . mkToggle (NOBORDERS ?? FULL ?? EOT)
--- . mkToggle (MIRROR ?? EOT)
+-- . mkToggle (single MIRROR)
-- $ tiled ||| 'XMonad.Layout.Grid.Grid' ||| 'XMonad.Layout.Circle.Circle'
-- @
--
@@ -164,6 +165,10 @@ infixr 0 ??
(??) :: (HList b w) => a -> b -> HCons a b
(??) = HCons
+-- | Construct a singleton transformer table.
+single :: a -> HCons a EOT
+single = (?? EOT)
+
class HList c a where
find :: (Transformer t a) => c -> t -> Maybe Int
resolve :: c -> Int -> b -> (forall t. (Transformer t a) => t -> b) -> b