aboutsummaryrefslogtreecommitdiffstats
path: root/Dishes.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-11-01 10:02:37 +0100
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-11-01 10:02:37 +0100
commit56f4ed7d9529117d83c71fc93a8c74d70d677267 (patch)
tree69a7c302dd7ed16c501f88cf89b55229497561c6 /Dishes.hs
parent48b25ee26b49ef33dc0858ce4b8afaa25ae951db (diff)
downloadXMonadContrib-56f4ed7d9529117d83c71fc93a8c74d70d677267.tar.gz
XMonadContrib-56f4ed7d9529117d83c71fc93a8c74d70d677267.tar.xz
XMonadContrib-56f4ed7d9529117d83c71fc93a8c74d70d677267.zip
Dishes: tabs
darcs-hash:20071101090237-a5988-871bbf591648e95be1c60d95ec41ebe730f9bd28.gz
Diffstat (limited to 'Dishes.hs')
-rw-r--r--Dishes.hs22
1 files changed, 11 insertions, 11 deletions
diff --git a/Dishes.hs b/Dishes.hs
index faacd31..25534ef 100644
--- a/Dishes.hs
+++ b/Dishes.hs
@@ -17,7 +17,7 @@
module XMonadContrib.Dishes (
-- * Usage
- -- $usage
+ -- $usage
Dishes (..)
) where
@@ -42,16 +42,16 @@ import Graphics.X11.Xlib
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
- pureMessage (Dishes nmaster h) m = fmap incmastern (fromMessage m)
- where incmastern (IncMasterN d) = Dishes (max 0 (nmaster+d)) h
+ doLayout (Dishes nmaster h) r =
+ return . (\x->(x,Nothing)) .
+ ap zip (dishes h r nmaster . length) . integrate
+ 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]
dishes h s nmaster n = if n <= nmaster
- then splitHorizontally n s
- else ws
- where
- (m,rest) = splitVerticallyBy (1 - (fromIntegral $ n - nmaster) * h) s
- ws = splitHorizontally nmaster m ++ splitVertically (n - nmaster) rest
+ then splitHorizontally n s
+ else ws
+ where
+ (m,rest) = splitVerticallyBy (1 - (fromIntegral $ n - nmaster) * h) s
+ ws = splitHorizontally nmaster m ++ splitVertically (n - nmaster) rest