From f9f72b911aa645fd9510dc541bb681da6153194f Mon Sep 17 00:00:00 2001 From: David Roundy Date: Tue, 25 Sep 2007 19:41:34 +0200 Subject: add support for parseable layouts not in the default. darcs-hash:20070925174134-72aca-3c3520c200c097938c56f7dd7fd5c86948d52c15 --- Config.hs | 7 +++++++ Config.hs-boot | 2 +- Operations.hs | 5 +++-- 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 ) -- cgit v1.2.3