summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2007-09-25 19:41:34 +0200
committerDavid Roundy <droundy@darcs.net>2007-09-25 19:41:34 +0200
commitf9f72b911aa645fd9510dc541bb681da6153194f (patch)
tree0ce95c468fb0d50a46cb5bc6f596a8eaa0f43ecc
parent71fdb786c46132af68cc1456929b7a8c614f5cf0 (diff)
downloadmetatile-f9f72b911aa645fd9510dc541bb681da6153194f.tar
metatile-f9f72b911aa645fd9510dc541bb681da6153194f.zip
add support for parseable layouts not in the default.
darcs-hash:20070925174134-72aca-3c3520c200c097938c56f7dd7fd5c86948d52c15
-rw-r--r--Config.hs7
-rw-r--r--Config.hs-boot2
-rw-r--r--Operations.hs5
3 files changed, 11 insertions, 3 deletions
diff --git a/Config.hs b/Config.hs
index 66f4fec..5c33072 100644
--- a/Config.hs
+++ b/Config.hs
@@ -92,6 +92,13 @@ borderWidth = 1
-- |
-- The default set of tiling algorithms
--
+otherPossibleLayouts :: [SomeLayout Window]
+otherPossibleLayouts = [SomeLayout $ Tall 1 1 1
+ ,SomeLayout $ Mirror $ Tall 1 1 1
+ ,SomeLayout Full
+ -- Extension-provided layouts
+ ]
+
defaultLayouts :: [SomeLayout Window]
defaultLayouts = [SomeLayout tiled
,SomeLayout $ Mirror tiled
diff --git a/Config.hs-boot b/Config.hs-boot
index 45d0850..41c45e5 100644
--- a/Config.hs-boot
+++ b/Config.hs-boot
@@ -6,4 +6,4 @@ borderWidth :: Dimension
logHook :: X ()
numlockMask :: KeyMask
workspaces :: [WorkspaceId]
-defaultLayouts :: [SomeLayout Window]
+defaultLayouts, otherPossibleLayouts :: [SomeLayout Window]
diff --git a/Operations.hs b/Operations.hs
index f310e91..1d3fed5 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -18,7 +18,7 @@ module Operations where
import XMonad
import qualified StackSet as W
-import {-# SOURCE #-} Config (borderWidth,logHook,numlockMask,defaultLayouts)
+import {-# SOURCE #-} Config (borderWidth,logHook,numlockMask,defaultLayouts,otherPossibleLayouts)
import Data.Maybe
import Data.List (nub, (\\), find, partition)
@@ -340,7 +340,8 @@ instance Message ChangeLayout
instance ReadableSomeLayout Window where
defaults = SomeLayout (LayoutSelection defaultLayouts) :
SomeLayout Full : SomeLayout (Tall 1 0.1 0.5) :
- SomeLayout (Mirror $ Tall 1 0.1 0.5) : defaultLayouts
+ SomeLayout (Mirror $ Tall 1 0.1 0.5) :
+ defaultLayouts ++ otherPossibleLayouts
data LayoutSelection a = LayoutSelection [SomeLayout a]
deriving ( Show, Read )