summaryrefslogtreecommitdiffstats
path: root/Main.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-05-04 06:56:44 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-05-04 06:56:44 +0200
commit7d2c080540f57cfb4bca155cf27b792c7e5d2d8c (patch)
tree873d25fe148775c53202b9026fcf2a5dca23838e /Main.hs
parent917bb796fe5e0cd6c6179ade9c698af3bf20ddd4 (diff)
downloadmetatile-7d2c080540f57cfb4bca155cf27b792c7e5d2d8c.tar
metatile-7d2c080540f57cfb4bca155cf27b792c7e5d2d8c.zip
Handle empty layout lists
darcs-hash:20070504045644-a5988-68a6d650bacab936f893b96bf866696da3f73436
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Main.hs b/Main.hs
index 33812ef..ae0b596 100644
--- a/Main.hs
+++ b/Main.hs
@@ -45,7 +45,8 @@ main = do
nbc <- initcolor normalBorderColor
fbc <- initcolor focusedBorderColor
- let cf = XConf
+ let safeLayouts = case defaultLayouts of [] -> (full, []); (x:xs) -> (x, xs)
+ cf = XConf
{ display = dpy
, xineScreens = xinesc
, theRoot = rootw
@@ -59,7 +60,7 @@ main = do
}
st = XState
{ workspace = W.empty workspaces (length xinesc)
- , layouts = M.empty
+ , layouts = M.fromList [(w, safeLayouts) | w <- [0 .. W workspaces - 1]]
}
xSetErrorHandler -- in C, I'm too lazy to write the binding