mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
add HiddenNonEmptyWS to CycleWS to avoid workspaces already visible.
This commit is contained in:
parent
0db06db23e
commit
6da9d73f0d
@ -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
|
||||||
|
| 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))
|
||||||
-- ^ cycle through workspaces satisfying
|
-- ^ cycle through workspaces satisfying
|
||||||
@ -181,6 +182,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 HiddenNonEmptyWS = do hs <- gets (map tag . hidden . windowset)
|
||||||
|
return (\w -> isJust (stack w) && tag w `elem` hs)
|
||||||
wsTypeToPred AnyWS = return (const True)
|
wsTypeToPred AnyWS = return (const True)
|
||||||
wsTypeToPred (WSIs p) = p
|
wsTypeToPred (WSIs p) = p
|
||||||
|
|
||||||
|
@ -87,8 +87,8 @@ keys x = M.fromList $
|
|||||||
layoutScreens 1 (fixedLayout [Rectangle 0 0 1024 768]))
|
layoutScreens 1 (fixedLayout [Rectangle 0 0 1024 768]))
|
||||||
, ((modMask x .|. shiftMask .|. controlMask, xK_z),
|
, ((modMask x .|. shiftMask .|. controlMask, xK_z),
|
||||||
layoutScreens 1 (fixedLayout [Rectangle 0 0 1440 900]))
|
layoutScreens 1 (fixedLayout [Rectangle 0 0 1440 900]))
|
||||||
, ((modMask x .|. shiftMask, xK_Right), moveTo Next NonEmptyWS)
|
, ((modMask x .|. shiftMask, xK_Right), moveTo Next HiddenNonEmptyWS)
|
||||||
, ((modMask x .|. shiftMask, xK_Left), moveTo Prev NonEmptyWS)
|
, ((modMask x .|. shiftMask, xK_Left), moveTo Prev HiddenNonEmptyWS)
|
||||||
, ((modMask x, xK_Right), sendMessage $ Go R)
|
, ((modMask x, xK_Right), sendMessage $ Go R)
|
||||||
, ((modMask x, xK_Left), sendMessage $ Go L)
|
, ((modMask x, xK_Left), sendMessage $ Go L)
|
||||||
, ((modMask x, xK_Up), sendMessage $ Go U)
|
, ((modMask x, xK_Up), sendMessage $ Go U)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user