From ec371628eb4365fad23dd7f7f332c7eb2fda6ea6 Mon Sep 17 00:00:00 2001 From: David Roundy Date: Sat, 8 Mar 2008 23:37:17 +0100 Subject: add HiddenNonEmptyWS to CycleWS to avoid workspaces already visible. darcs-hash:20080308223717-72aca-4700b3f3ae28b1ceef816965bbfa7a8c9ce8fa1b.gz --- XMonad/Actions/CycleWS.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'XMonad/Actions/CycleWS.hs') diff --git a/XMonad/Actions/CycleWS.hs b/XMonad/Actions/CycleWS.hs index dc8db73..ac0fddb 100644 --- a/XMonad/Actions/CycleWS.hs +++ b/XMonad/Actions/CycleWS.hs @@ -172,6 +172,7 @@ data WSDirection = Next | Prev -- | What type of workspaces should be included in the cycle? data WSType = EmptyWS -- ^ cycle through empty workspaces | NonEmptyWS -- ^ cycle through non-empty workspaces + | HiddenNonEmptyWS -- ^ cycle through non-empty non-visible workspaces | AnyWS -- ^ cycle through all workspaces | WSIs (X (WindowSpace -> Bool)) -- ^ cycle through workspaces satisfying @@ -181,6 +182,8 @@ data WSType = EmptyWS -- ^ cycle through empty workspaces wsTypeToPred :: WSType -> X (WindowSpace -> Bool) wsTypeToPred EmptyWS = return (isNothing . stack) wsTypeToPred NonEmptyWS = return (isJust . stack) +wsTypeToPred HiddenNonEmptyWS = do hs <- gets (map tag . hidden . windowset) + return (\w -> isJust (stack w) && tag w `elem` hs) wsTypeToPred AnyWS = return (const True) wsTypeToPred (WSIs p) = p -- cgit v1.2.3