mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 04:31:52 -07:00
make some layouts more general.
This commit is contained in:
@@ -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) ..]
|
||||
|
Reference in New Issue
Block a user