From 0a303d0d974cac829d1cb9f6df9a155f041d25d7 Mon Sep 17 00:00:00 2001 From: nornagon Date: Fri, 12 Oct 2007 09:29:53 +0200 Subject: Add documentation to Dishes.hs darcs-hash:20071012072953-25eb7-df0c646cdc908f54c60943cc7d5441591073f7d2.gz --- Dishes.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Dishes.hs') 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] -- cgit v1.2.3