diff options
author | Anders Engstrom <ankaan@gmail.com> | 2009-11-15 14:02:17 +0100 |
---|---|---|
committer | Anders Engstrom <ankaan@gmail.com> | 2009-11-15 14:02:17 +0100 |
commit | fb4befe3374159197c2b8196e77c470a4a0e6a7e (patch) | |
tree | a387f0e870d75c4887b6e416a0835287187acbea /XMonad/Actions | |
parent | 140ea83e4922055317ab64d0a968f89efc5e3cc4 (diff) | |
download | XMonadContrib-fb4befe3374159197c2b8196e77c470a4a0e6a7e.tar.gz XMonadContrib-fb4befe3374159197c2b8196e77c470a4a0e6a7e.tar.xz XMonadContrib-fb4befe3374159197c2b8196e77c470a4a0e6a7e.zip |
X.A.CycleWS cycle by tag group
Ignore-this: 909da8c00b47a31d04f59bd3751c60bc
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.
darcs-hash:20091115130217-8978f-b0d053d44faa9b3d165b5f0b8c4aab3d27caca37.gz
Diffstat (limited to 'XMonad/Actions')
-rw-r--r-- | XMonad/Actions/CycleWS.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/XMonad/Actions/CycleWS.hs b/XMonad/Actions/CycleWS.hs index 18be5d8..ee462d9 100644 --- a/XMonad/Actions/CycleWS.hs +++ b/XMonad/Actions/CycleWS.hs @@ -218,6 +218,10 @@ data WSType = EmptyWS -- ^ cycle through empty workspaces | HiddenWS -- ^ cycle through non-visible workspaces | HiddenNonEmptyWS -- ^ cycle through non-empty non-visible 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)) -- ^ cycle through workspaces satisfying -- an arbitrary predicate @@ -232,6 +236,9 @@ wsTypeToPred HiddenNonEmptyWS = do ne <- wsTypeToPred NonEmptyWS hi <- wsTypeToPred HiddenWS return (\w -> hi w && ne w) 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 -- | View the next workspace in the given direction that satisfies |