X.A.CycleWS: Added ignoringWSs

`ignoringWSs` is useful in combination with `X.U.NamedScratchpad` to
skip a list of tags
This commit is contained in:
Yecine Megdiche
2021-06-12 12:00:02 +02:00
parent 51394c6e3e
commit ea990921e2
2 changed files with 15 additions and 1 deletions

View File

@@ -116,7 +116,7 @@
- `XMonad.Actions.CycleWS`
- Deprecated `EmptyWS`, `HiddenWS`, `NonEmptyWS`, `HiddenNonEmptyWS`,
`HiddenEmptyWS`, `AnyWS` and `WSTagGroup`
`HiddenEmptyWS`, `AnyWS` and `WSTagGroup`.
### New Modules
@@ -643,6 +643,10 @@
- Added `hiddenWS`, `emptyWS` and `anyWS` to replace deprecated
constructors.
- Added `ingoringWSs` as a `WSType` predicate to skip workspaces having a
tag in a given list.
## 0.16
### Breaking Changes

View File

@@ -67,6 +67,7 @@ module XMonad.Actions.CycleWS (
, hiddenWS
, anyWS
, wsTagGroup
, ignoringWSs
, shiftTo
, moveTo
@@ -297,6 +298,15 @@ hiddenWS = WSIs $ do
anyWS :: WSType
anyWS = WSIs . return $ const True
-- | Cycle through workspaces that are not in the given list. This could, for
-- example, be used for skipping the workspace reserved for
-- "XMonad.Util.NamedScratchpad":
--
-- > moveTo Next $ hidden :&: Not empty :&: ignoringWSs [scratchpadWorkspaceTag]
--
ignoringWSs :: [WorkspaceId] -> WSType
ignoringWSs ts = WSIs . return $ (`notElem` ts) . tag
-- | 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