make some layouts more general.

This commit is contained in:
David Roundy
2007-06-20 12:54:20 +00:00
parent 63023902d2
commit 8a78694d23
4 changed files with 7 additions and 7 deletions

View File

@@ -27,11 +27,11 @@ import StackSet (integrate)
--
-- > import XMonadContrib.Circle
circle :: Layout Window
circle :: Layout a
circle = Layout { doLayout = \r -> circleLayout r . integrate,
modifyLayout = return . const Nothing }
circleLayout :: Rectangle -> [Window] -> X [(Window, Rectangle)]
circleLayout :: Rectangle -> [a] -> X [(a, Rectangle)]
circleLayout _ [] = return []
circleLayout r (w:ws) = return $ (w, center r) : (zip ws sats)
where sats = map (satellite r) $ take (length ws) [0, pi * 2 / fromIntegral (length ws) ..]