From 9734b2f51f9c94ec802820bc57fe50297a5dec77 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Mon, 14 Sep 2015 19:51:31 +0200 Subject: Exclude empty topics from CycleWS --- xmonad.hs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/xmonad.hs b/xmonad.hs index 1c565cc..ace84e4 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -195,17 +195,17 @@ scratchpads = (customFloating $ W.RationalRect 0.03 0.03 0.94 0.6) ] -hiddenWS :: X (WindowSpace -> Bool) -hiddenWS = do hs <- gets (map W.tag . W.hidden . windowset) - return (\w -> W.tag w `elem` hs) - -notNspWS :: X (WindowSpace -> Bool) -notNspWS = return $ ("NSP" /=) . W.tag - notNspHiddenWS :: X (WindowSpace -> Bool) -notNspHiddenWS = do nn <- notNspWS - hi <- hiddenWS - return (\w -> hi w && nn w) +notNspHiddenWS = do notNsp <- notNspWS + hidden <- hiddenWS + nonEmpty <- nonEmptyWS + return (\w -> hidden w && nonEmpty w && notNsp w) + where + hiddenWS = do hs <- gets (map W.tag . W.hidden . windowset) + return (\w -> W.tag w `elem` hs) + nonEmptyWS = return $ isJust . W.stack + notNspWS = return $ ("NSP" /=) . W.tag + --}}} -- cgit v1.2.3