summaryrefslogtreecommitdiffstats
path: root/XMonad.hs
diff options
context:
space:
mode:
authorhughes <hughes@rpi.edu>2007-03-26 17:02:13 +0200
committerhughes <hughes@rpi.edu>2007-03-26 17:02:13 +0200
commit962df57b2c5cbbdaf54900091a675c5f1d2c6aa1 (patch)
tree790f56ee6146bfadf411fcb41c8a01e1e7763491 /XMonad.hs
parent7d7626d3addddc2c3161081223458b364feccf5f (diff)
downloadmetatile-962df57b2c5cbbdaf54900091a675c5f1d2c6aa1.tar
metatile-962df57b2c5cbbdaf54900091a675c5f1d2c6aa1.zip
Workspace-specific layouts
darcs-hash:20070326150213-3a569-64dd38c00558d58f27c3803ab15485892c24cfaa
Diffstat (limited to 'XMonad.hs')
-rw-r--r--XMonad.hs18
1 files changed, 15 insertions, 3 deletions
diff --git a/XMonad.hs b/XMonad.hs
index ee23739..32c0c23 100644
--- a/XMonad.hs
+++ b/XMonad.hs
@@ -15,7 +15,7 @@
--
module XMonad (
- X, WorkSpace, XState(..), Layout(..),
+ X, WorkSpace, XState(..), Layout(..), LayoutDesc(..),
runX, io, withDisplay, isRoot,
spawn, trace, whenJust
) where
@@ -43,9 +43,13 @@ data XState = XState
, wmprotocols :: {-# UNPACK #-} !Atom
, dimensions :: {-# UNPACK #-} !(Int,Int)
, workspace :: {-# UNPACK #-} !WorkSpace -- ^ workspace list
- , layout :: {-# UNPACK #-} !Layout
+ , defaultLayoutDesc :: {-# UNPACK #-} !LayoutDesc
+ , layoutDescs :: {-# UNPACK #-} !(M.Map Int LayoutDesc)
+ -- ^ mapping of workspaces to descriptions of their layouts
+
+ -- , layout :: {-# UNPACK #-} !Layout
-- how much of the screen the main window should take
- , leftWidth :: {-# UNPACK #-} !Rational
+ -- , leftWidth :: {-# UNPACK #-} !Rational
}
type WorkSpace = StackSet Window
@@ -53,6 +57,14 @@ type WorkSpace = StackSet Window
-- | The different layout modes
data Layout = Full | Tile
+-- | A full description of a particular workspace's layout parameters.
+data LayoutDesc = LayoutDesc { layoutType :: !Layout
+ , tileFraction :: !Rational
+ }
+
+
+
+
-- | The X monad, a StateT transformer over IO encapuslating the window
-- manager state
newtype X a = X (StateT XState IO a)