merge old workspace tags with new on restart.

This commit is contained in:
David Roundy
2007-09-26 18:33:09 +00:00
parent 60dda50181
commit f1c1e982a2
2 changed files with 21 additions and 4 deletions

View File

@@ -51,9 +51,9 @@ main = do
args <- getArgs
let winset | ("--resume" : s : _) <- args
, [(x, "")] <- reads s = x
| otherwise = new (SomeLayout $ LayoutSelection safeLayouts)
workspaces $ zipWith SD xinesc gaps
, [(x, "")] <- reads s = W.ensureTags defaultLayout workspaces x
| otherwise = new defaultLayout workspaces $ zipWith SD xinesc gaps
defaultLayout = SomeLayout $ LayoutSelection safeLayouts
gaps = take (length xinesc) $ defaultGaps ++ repeat (0,0,0,0)
safeLayouts = if null defaultLayouts then [SomeLayout Full] else defaultLayouts