From b682eaf8fcbb548dacb35b4103e546cbd9fca3ed Mon Sep 17 00:00:00 2001 From: Adam Vogt Date: Fri, 2 May 2014 19:59:10 +0200 Subject: hack to avoid crash when fewer workspaces than screens (#543) Ignore-this: 1bb0392eaed1e5b5437afff658960e95 darcs-hash:20140502175910-1499c-94908a88f9d05ed9fcd0e82efd678b2ed63d4667.gz --- src/XMonad/Main.hsc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/XMonad') diff --git a/src/XMonad/Main.hsc b/src/XMonad/Main.hsc index 5d59042..4be4ac6 100644 --- a/src/XMonad/Main.hsc +++ b/src/XMonad/Main.hsc @@ -96,7 +96,8 @@ xmonad initxmc = do let layout = layoutHook xmc lreads = readsLayout layout - initialWinset = new layout (workspaces xmc) $ map SD xinesc + initialWinset = let padToLen n xs = take (max n (length xs)) $ xs ++ repeat "" + in new layout (padToLen (length xinesc) (workspaces xmc)) $ map SD xinesc maybeRead reads' s = case reads' s of [(x, "")] -> Just x _ -> Nothing -- cgit v1.2.3