summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2015-09-14 19:51:31 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2015-09-14 19:51:31 +0200
commit9734b2f51f9c94ec802820bc57fe50297a5dec77 (patch)
treee502bdacb313d27772bfc5a943f1d38bc13560ef
parent80b67074426f5f1190b74e7f1ffb01ec8a1cc20f (diff)
downloadxmonad-config-9734b2f51f9c94ec802820bc57fe50297a5dec77.tar.gz
xmonad-config-9734b2f51f9c94ec802820bc57fe50297a5dec77.tar.xz
xmonad-config-9734b2f51f9c94ec802820bc57fe50297a5dec77.zip
Exclude empty topics from CycleWS
-rw-r--r--xmonad.hs20
1 files 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
+
--}}}