diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2015-09-14 19:51:31 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2015-09-14 19:51:31 +0200 |
commit | 9734b2f51f9c94ec802820bc57fe50297a5dec77 (patch) | |
tree | e502bdacb313d27772bfc5a943f1d38bc13560ef | |
parent | 80b67074426f5f1190b74e7f1ffb01ec8a1cc20f (diff) | |
download | xmonad-config-9734b2f51f9c94ec802820bc57fe50297a5dec77.tar.gz xmonad-config-9734b2f51f9c94ec802820bc57fe50297a5dec77.tar.xz xmonad-config-9734b2f51f9c94ec802820bc57fe50297a5dec77.zip |
Exclude empty topics from CycleWS
-rw-r--r-- | xmonad.hs | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -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 + --}}} |