mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
Add straightforward HiddenWS to WSType
With NonEmptyWS and HiddenNonEmptyWS present, HiddenWS is obviously missing.
This commit is contained in:
parent
2480ba1f02
commit
5514c2ddca
@ -172,6 +172,7 @@ data WSDirection = Next | Prev
|
|||||||
-- | What type of workspaces should be included in the cycle?
|
-- | What type of workspaces should be included in the cycle?
|
||||||
data WSType = EmptyWS -- ^ cycle through empty workspaces
|
data WSType = EmptyWS -- ^ cycle through empty workspaces
|
||||||
| NonEmptyWS -- ^ cycle through non-empty workspaces
|
| NonEmptyWS -- ^ cycle through non-empty workspaces
|
||||||
|
| HiddenWS -- ^ cycle through non-visible workspaces
|
||||||
| HiddenNonEmptyWS -- ^ cycle through non-empty non-visible workspaces
|
| HiddenNonEmptyWS -- ^ cycle through non-empty non-visible workspaces
|
||||||
| AnyWS -- ^ cycle through all workspaces
|
| AnyWS -- ^ cycle through all workspaces
|
||||||
| WSIs (X (WindowSpace -> Bool))
|
| WSIs (X (WindowSpace -> Bool))
|
||||||
@ -182,6 +183,8 @@ data WSType = EmptyWS -- ^ cycle through empty workspaces
|
|||||||
wsTypeToPred :: WSType -> X (WindowSpace -> Bool)
|
wsTypeToPred :: WSType -> X (WindowSpace -> Bool)
|
||||||
wsTypeToPred EmptyWS = return (isNothing . stack)
|
wsTypeToPred EmptyWS = return (isNothing . stack)
|
||||||
wsTypeToPred NonEmptyWS = return (isJust . stack)
|
wsTypeToPred NonEmptyWS = return (isJust . stack)
|
||||||
|
wsTypeToPred HiddenWS = do hs <- gets (map tag . hidden . windowset)
|
||||||
|
return (\w -> tag w `elem` hs)
|
||||||
wsTypeToPred HiddenNonEmptyWS = do hs <- gets (map tag . hidden . windowset)
|
wsTypeToPred HiddenNonEmptyWS = do hs <- gets (map tag . hidden . windowset)
|
||||||
return (\w -> isJust (stack w) && tag w `elem` hs)
|
return (\w -> isJust (stack w) && tag w `elem` hs)
|
||||||
wsTypeToPred AnyWS = return (const True)
|
wsTypeToPred AnyWS = return (const True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user