From 8d1d4b466e6dbf5fdd500357d49db425743f6768 Mon Sep 17 00:00:00 2001 From: David Roundy Date: Fri, 21 Sep 2007 21:55:25 +0000 Subject: [PATCH] make Circle work with Layout class. --- Circle.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Circle.hs b/Circle.hs index fde2351f..225871b8 100644 --- a/Circle.hs +++ b/Circle.hs @@ -15,7 +15,7 @@ module XMonadContrib.Circle ( -- * Usage -- $usage - circle + Circle ) where -- actually it's an ellipse import Data.List @@ -23,8 +23,6 @@ import Graphics.X11.Xlib import XMonad import StackSet (integrate, peek) -import XMonadContrib.LayoutHelpers ( idModify ) - -- $usage -- You can use this module with the following in your Config.hs file: -- @@ -32,10 +30,12 @@ import XMonadContrib.LayoutHelpers ( idModify ) -- %import XMonadContrib.Circle -circle :: Layout Window -circle = Layout { doLayout = \r s -> do { layout <- raiseFocus $ circleLayout r $ integrate s - ; return (layout, Nothing) } - , modifyLayout = idModify } +data Circle a = Circle deriving ( Read, Show ) + +instance Layout Circle Window where + doLayout Circle r s = do layout <- raiseFocus $ circleLayout r $ integrate s + return (layout, Nothing) + modifyLayout Circle _ = return Nothing circleLayout :: Rectangle -> [a] -> [(a, Rectangle)] circleLayout _ [] = []