From 4c37ae203f967d35ecf872d144cccddfe2d4775c Mon Sep 17 00:00:00 2001 From: David Roundy Date: Tue, 25 Sep 2007 19:05:03 +0200 Subject: make it easier to define pure layouts. darcs-hash:20070925170503-72aca-22b50fd803b02bb36ca12befdeeb182439395bc8.gz --- XMonad.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'XMonad.hs') diff --git a/XMonad.hs b/XMonad.hs index c0ca75d..ef2a2f1 100644 --- a/XMonad.hs +++ b/XMonad.hs @@ -151,6 +151,10 @@ readLayout ls s = concatMap rl ls class (Show (layout a), Read (layout a)) => Layout layout a where doLayout :: layout a -> Rectangle -> Stack a -> X ([(a, Rectangle)], Maybe (layout a)) + doLayout l r s = return (pureLayout l r s, Nothing) + pureLayout :: layout a -> Rectangle -> Stack a -> [(a, Rectangle)] + pureLayout _ r s = [(focus s, r)] + modifyLayout :: layout a -> SomeMessage -> X (Maybe (layout a)) modifyLayout _ _ = return Nothing description :: layout a -> String -- cgit v1.2.3