From 6b4aa7efb8a2a9c82a8610ae8ab25108e32d1e15 Mon Sep 17 00:00:00 2001 From: Brent Yorgey Date: Fri, 1 Feb 2008 19:06:18 +0100 Subject: 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 --- XMonad/Actions/CycleWS.hs | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'XMonad/Actions/CycleWS.hs') 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) -- cgit v1.2.3