summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2007-09-25 19:05:03 +0200
committerDavid Roundy <droundy@darcs.net>2007-09-25 19:05:03 +0200
commitf14b55afbec4302b1e94c3090c68ead9aef8e950 (patch)
treed867247a07bc9451a935df3849fc7bb9d3176c68
parent8874b8675a000b63fe435abdc013af03199e6c31 (diff)
downloadmetatile-f14b55afbec4302b1e94c3090c68ead9aef8e950.tar
metatile-f14b55afbec4302b1e94c3090c68ead9aef8e950.zip
make it easier to define pure layouts.
darcs-hash:20070925170503-72aca-22b50fd803b02bb36ca12befdeeb182439395bc8
-rw-r--r--Operations.hs3
-rw-r--r--XMonad.hs4
2 files changed, 5 insertions, 2 deletions
diff --git a/Operations.hs b/Operations.hs
index e03a4ae..a456150 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -390,8 +390,7 @@ instance Message IncMasterN
-- simple fullscreen mode, just render all windows fullscreen.
-- a plea for tuple sections: map . (,sc)
data Full a = Full deriving ( Show, Read )
-instance Layout Full a where
- doLayout Full sc (W.Stack f _ _) = return ([(f, sc)], Nothing)
+instance Layout Full a
--
-- The tiling mode of xmonad, and its operations.
--
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