aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2008-03-08 23:37:17 +0100
committerDavid Roundy <droundy@darcs.net>2008-03-08 23:37:17 +0100
commitec371628eb4365fad23dd7f7f332c7eb2fda6ea6 (patch)
tree77fbefe3784480f13bc6bb8a66881647a72d4705 /XMonad
parente80dd3730be99d8b349368d7e73c05ee9be3f1c3 (diff)
downloadXMonadContrib-ec371628eb4365fad23dd7f7f332c7eb2fda6ea6.tar.gz
XMonadContrib-ec371628eb4365fad23dd7f7f332c7eb2fda6ea6.tar.xz
XMonadContrib-ec371628eb4365fad23dd7f7f332c7eb2fda6ea6.zip
add HiddenNonEmptyWS to CycleWS to avoid workspaces already visible.
darcs-hash:20080308223717-72aca-4700b3f3ae28b1ceef816965bbfa7a8c9ce8fa1b.gz
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Actions/CycleWS.hs3
-rw-r--r--XMonad/Config/Droundy.hs4
2 files changed, 5 insertions, 2 deletions
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
diff --git a/XMonad/Config/Droundy.hs b/XMonad/Config/Droundy.hs
index 195ea50..f03b56c 100644
--- a/XMonad/Config/Droundy.hs
+++ b/XMonad/Config/Droundy.hs
@@ -87,8 +87,8 @@ keys x = M.fromList $
layoutScreens 1 (fixedLayout [Rectangle 0 0 1024 768]))
, ((modMask x .|. shiftMask .|. controlMask, xK_z),
layoutScreens 1 (fixedLayout [Rectangle 0 0 1440 900]))
- , ((modMask x .|. shiftMask, xK_Right), moveTo Next NonEmptyWS)
- , ((modMask x .|. shiftMask, xK_Left), moveTo Prev NonEmptyWS)
+ , ((modMask x .|. shiftMask, xK_Right), moveTo Next HiddenNonEmptyWS)
+ , ((modMask x .|. shiftMask, xK_Left), moveTo Prev HiddenNonEmptyWS)
, ((modMask x, xK_Right), sendMessage $ Go R)
, ((modMask x, xK_Left), sendMessage $ Go L)
, ((modMask x, xK_Up), sendMessage $ Go U)