make everything work with new doLayout.

This modifies all the contrib modules to work (so far as I know) with the
new contrib layout.  The exception is the LayoutHooks module, which isn't
used.  It exports an API that is inherently unsafe, so far as I can tell
(and always has been).
This commit is contained in:
David Roundy
2007-06-23 21:09:52 +00:00
parent 91a286a9fd
commit d3048ed615
13 changed files with 97 additions and 118 deletions

View File

@@ -22,14 +22,16 @@ import Graphics.X11.Xlib
import XMonad
import StackSet (integrate, Stack(..))
import XMonadContrib.LayoutHelpers ( idModify )
-- $usage
-- You can use this module with the following in your Config.hs file:
--
-- > import XMonadContrib.Circle
circle :: Layout a
circle = Layout { doLayout = \r s -> return . raise (length (up s)) . circleLayout r $ integrate s,
modifyLayout = return . const Nothing }
circle = Layout { doLayout = \r s -> return (raise (length (up s)) . circleLayout r $ integrate s, Nothing),
modifyLayout = idModify }
circleLayout :: Rectangle -> [a] -> [(a, Rectangle)]
circleLayout _ [] = []