aboutsummaryrefslogtreecommitdiffstats
path: root/Dishes.hs
diff options
context:
space:
mode:
authornornagon <nornagon@gmail.com>2007-10-12 09:29:53 +0200
committernornagon <nornagon@gmail.com>2007-10-12 09:29:53 +0200
commit0a303d0d974cac829d1cb9f6df9a155f041d25d7 (patch)
treea09d2abcfa18b216ffb02ada162069f906c77861 /Dishes.hs
parenta5df0de237d395b24b097f6d35f700d10b86f6d0 (diff)
downloadXMonadContrib-0a303d0d974cac829d1cb9f6df9a155f041d25d7.tar.gz
XMonadContrib-0a303d0d974cac829d1cb9f6df9a155f041d25d7.tar.xz
XMonadContrib-0a303d0d974cac829d1cb9f6df9a155f041d25d7.zip
Add documentation to Dishes.hs
darcs-hash:20071012072953-25eb7-df0c646cdc908f54c60943cc7d5441591073f7d2.gz
Diffstat (limited to 'Dishes.hs')
-rw-r--r--Dishes.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Dishes.hs b/Dishes.hs
index cb09d9d..a7ace7d 100644
--- a/Dishes.hs
+++ b/Dishes.hs
@@ -32,15 +32,20 @@ import Graphics.X11.Xlib
-- You can use this module with the following in your Config.hs file:
--
-- > import XMonadContrib.Dishes
+--
+-- and add the following line to your 'defaultLayouts'
+--
+-- > , Layout $ Dishes 2 (1%6)
-- %import XMonadContrib.Dishes
+-- %layout , Layout $ Dishes 2 (1%6)
data Dishes a = Dishes Int Rational deriving (Show, Read)
instance LayoutClass Dishes a where
doLayout (Dishes nmaster h) r =
return . (\x->(x,Nothing)) .
ap zip (dishes h r nmaster . length) . integrate
- handleMessage (Dishes nmaster h) m = return $ fmap incmastern (fromMessage m)
+ pureMessage (Dishes nmaster h) m = fmap incmastern (fromMessage m)
where incmastern (IncMasterN d) = Dishes (max 0 (nmaster+d)) h
dishes :: Rational -> Rectangle -> Int -> Int -> [Rectangle]