aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorWirt Wolff <wirtwolff@gmail.com>2009-09-26 17:47:00 +0200
committerWirt Wolff <wirtwolff@gmail.com>2009-09-26 17:47:00 +0200
commit0d01eed23259e5a6b300e79b363cdef4d1e3f8d3 (patch)
treefd6f328653f44e5ff06bce54b859e924eec204db /XMonad
parentafdf0c9fbb8f390702fe45a16f6c0c3a17ca1606 (diff)
downloadXMonadContrib-0d01eed23259e5a6b300e79b363cdef4d1e3f8d3.tar.gz
XMonadContrib-0d01eed23259e5a6b300e79b363cdef4d1e3f8d3.tar.xz
XMonadContrib-0d01eed23259e5a6b300e79b363cdef4d1e3f8d3.zip
A.CycleWindows update docs, use lib fn second instead of custom lambda
Ignore-this: 7ec0d6a46d4a6255870b1e9c4a25c1bb darcs-hash:20090926154700-18562-da3efbc643bfa9943e451ca0060c67d9f60fff99.gz
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Actions/CycleWindows.hs19
1 files changed, 14 insertions, 5 deletions
diff --git a/XMonad/Actions/CycleWindows.hs b/XMonad/Actions/CycleWindows.hs
index 0f614b8..143cfce 100644
--- a/XMonad/Actions/CycleWindows.hs
+++ b/XMonad/Actions/CycleWindows.hs
@@ -21,8 +21,8 @@
--
-- These bindings are especially useful with layouts that hide some of
-- the windows in the stack, such as Full, "XMonad.Layout.TwoPane" or
--- "XMonad.Layout.Mosaic" with three or four panes. See also
--- "XMonad.Actions.RotSlaves" for related actions.
+-- when using "XMonad.Layout.LimitWindows" to only show three or four
+-- panes. See also "XMonad.Actions.RotSlaves" for related actions.
-----------------------------------------------------------------------------
module XMonad.Actions.CycleWindows (
-- * Usage
@@ -53,6 +53,8 @@ import XMonad
import qualified XMonad.StackSet as W
import XMonad.Actions.RotSlaves
+import Control.Arrow (second)
+
-- $usage
-- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@ file:
--
@@ -174,12 +176,19 @@ rotOpposite' :: W.Stack a -> W.Stack a
rotOpposite' (W.Stack t l r) = W.Stack t' l' r'
where rrvl = r ++ reverse l
part = (length rrvl + 1) `div` 2
- (l',t':r') = (\(f,s) -> (f, reverse s)) . splitAt (length l) $
+ (l',t':r') = second reverse . splitAt (length l) $
reverse (take part rrvl ++ t : drop part rrvl)
-- $focused
--- Rotate windows through the focused frame, excluding the \"next\" window.
+-- Most people will want the @rotAllUp@ or @rotAllDown@ actions from
+-- "XMonad.Actions.RotSlaves" to cycle all windows in the stack.
+--
+-- The following actions keep the \"next\" window stable, which is
+-- mostly useful in two window layouts, or when you have a log viewer or
+-- buffer window you want to keep next to the cycled window.
+
+-- | Rotate windows through the focused frame, excluding the \"next\" window.
-- With, e.g. TwoPane, this allows cycling windows through either the
-- master or slave pane, without changing the other frame. When the master
-- is focused, the window below is skipped, when a non-master window is
@@ -199,7 +208,7 @@ rotFocused' f s@(W.Stack _ _ _) = rotSlaves' f s -- otherwise
-- $unfocused
-- Rotate windows through the unfocused frames. This is similar to
--- rotSlaves, from "XMonad.Actions.RotSlaves", but excludes the current
+-- @rotSlaves@, from "XMonad.Actions.RotSlaves", but excludes the current
-- frame rather than master.
rotUnfocusedUp :: X ()
rotUnfocusedUp = windows . W.modify' $ rotUnfocused' rotUp