mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
X.A.CycleWS cycle by tag group
Allow grouping of workspaces, so that a user can cycle through those in the same group. Grouping is done by using a special character in the tag.
This commit is contained in:
parent
b4acd87c7a
commit
5463e04b94
@ -218,6 +218,10 @@ data WSType = EmptyWS -- ^ cycle through empty workspaces
|
|||||||
| HiddenWS -- ^ cycle through non-visible 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
|
||||||
|
| WSTagGroup Char
|
||||||
|
-- ^ cycle through workspaces in the same group, the
|
||||||
|
-- group name is all characters up to the first
|
||||||
|
-- separator character or the end of the tag
|
||||||
| WSIs (X (WindowSpace -> Bool))
|
| WSIs (X (WindowSpace -> Bool))
|
||||||
-- ^ cycle through workspaces satisfying
|
-- ^ cycle through workspaces satisfying
|
||||||
-- an arbitrary predicate
|
-- an arbitrary predicate
|
||||||
@ -232,6 +236,9 @@ wsTypeToPred HiddenNonEmptyWS = do ne <- wsTypeToPred NonEmptyWS
|
|||||||
hi <- wsTypeToPred HiddenWS
|
hi <- wsTypeToPred HiddenWS
|
||||||
return (\w -> hi w && ne w)
|
return (\w -> hi w && ne w)
|
||||||
wsTypeToPred AnyWS = return (const True)
|
wsTypeToPred AnyWS = return (const True)
|
||||||
|
wsTypeToPred (WSTagGroup sep) = do cur <- (groupName.workspace.current) `fmap` gets windowset
|
||||||
|
return $ (cur ==).groupName
|
||||||
|
where groupName = takeWhile (/=sep).tag
|
||||||
wsTypeToPred (WSIs p) = p
|
wsTypeToPred (WSIs p) = p
|
||||||
|
|
||||||
-- | View the next workspace in the given direction that satisfies
|
-- | View the next workspace in the given direction that satisfies
|
||||||
|
Loading…
x
Reference in New Issue
Block a user