aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Actions/CycleWS.hs
diff options
context:
space:
mode:
authorBrent Yorgey <byorgey@gmail.com>2008-02-01 19:06:18 +0100
committerBrent Yorgey <byorgey@gmail.com>2008-02-01 19:06:18 +0100
commit6b4aa7efb8a2a9c82a8610ae8ab25108e32d1e15 (patch)
tree9478cd5f10b54294cc56dc4cbce04e755f4f620c /XMonad/Actions/CycleWS.hs
parenta99d18cccbaa0d2c26d4d85b2bf7fb13eb9462c5 (diff)
downloadXMonadContrib-6b4aa7efb8a2a9c82a8610ae8ab25108e32d1e15.tar.gz
XMonadContrib-6b4aa7efb8a2a9c82a8610ae8ab25108e32d1e15.tar.xz
XMonadContrib-6b4aa7efb8a2a9c82a8610ae8ab25108e32d1e15.zip
REMOVE RotView: use CycleWS instead.
See CycleWS docs for info on switching, or just look at the changes to XMonad.Config.Droundy. darcs-hash:20080201180618-bd4d7-7b4deec416c0afd7926b44652bd00cfede1e5e17.gz
Diffstat (limited to 'XMonad/Actions/CycleWS.hs')
-rw-r--r--XMonad/Actions/CycleWS.hs21
1 files changed, 8 insertions, 13 deletions
diff --git a/XMonad/Actions/CycleWS.hs b/XMonad/Actions/CycleWS.hs
index c63afe9..463c449 100644
--- a/XMonad/Actions/CycleWS.hs
+++ b/XMonad/Actions/CycleWS.hs
@@ -16,24 +16,19 @@
-- subset of workspaces, and to cycle by more than one workspace at a
-- time.
--
--- Note that this module now subsumes the functionality of
--- "XMonad.Actions.RotView". To wit, 'XMonad.Actions.RotView.rotView'
--- can be implemented in terms of "XMonad.Actions.CycleWS" functions as
+-- Note that this module now subsumes the functionality of the former
+-- @XMonad.Actions.RotView@. Former users of @rotView@ can simply replace
+-- @rotView True@ with @moveTo Next NonEmptyWS@, and so on.
+--
+-- If you want to exactly replicate the action of @rotView@ (cycling
+-- through workspace in order lexicographically by tag, instead of in
+-- the order specified in the config), it can be implemented as:
--
-- > rotView b = do t <- findWorkspace getSortByTag (bToDir b) NonEmptyWS 1
-- > windows . greedyView $ t
-- > where bToDir True = Next
-- > bToDir False = Prev
--
--- Of course, usually one would want to use
--- 'XMonad.Util.WorkspaceCompare.getSortByIndex' instead of
--- 'XMonad.Util.WorkspaceCompare.getSortByTag', to cycle through the
--- workspaces in the order in which they are listed in your config,
--- instead of alphabetical order (as is the default in
--- 'XMonad.Actions.RotView.rotView'). In this case one can simply use
--- @moveTo Next NonEmptyWS@ and @moveTo Prev NonEmptyWS@ in place of
--- @rotView True@ and @rotView False@, respectively.
---
-----------------------------------------------------------------------------
module XMonad.Actions.CycleWS (
@@ -208,7 +203,7 @@ shiftTo dir t = findWorkspace getSortByIndex dir t 1 >>= windows . shift
--
-- For ideas of what to do with a workspace tag once obtained, note
-- that 'moveTo' and 'shiftTo' are implemented by applying @(>>=
--- windows . greedyView)@ and @(>>= windows . shift)@, respectively,
+-- (windows . greedyView))@ and @(>>= (windows . shift))@, respectively,
-- to the output of 'findWorkspace'.
findWorkspace :: X WorkspaceSort -> WSDirection -> WSType -> Int -> X WorkspaceId
findWorkspace s dir t n = findWorkspaceGen s (wsTypeToPred t) (maybeNegate dir n)