| |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Description | |||||||||||||||||||||||||
Provides bindings to cycle windows up or down on the current workspace stack while maintaining focus in place. Bindings are available to:
These bindings are especially useful with layouts that hide some of the windows in the stack, such as Full, XMonad.Layout.TwoPane or when using XMonad.Layout.LimitWindows to only show three or four panes. See also XMonad.Actions.RotSlaves for related actions. | |||||||||||||||||||||||||
Synopsis | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Usage | |||||||||||||||||||||||||
You can use this module with the following in your ~/.xmonad/xmonad.hs file: import XMonad.Actions.CycleWindows -- config -- other key bindings with x here your config -- make sure mod matches keysym , ((mod4Mask, xK_s), cycleRecentWindows [xK_Super_L] xK_s xK_w) , ((modm, xK_z), rotOpposite) , ((modm , xK_i), rotUnfocusedUp) , ((modm , xK_u), rotUnfocusedDown) , ((modm .|. controlMask, xK_i), rotFocusedUp) , ((modm .|. controlMask, xK_u), rotFocusedDown) Also, if you use focus follows mouse, you will want to read the section on updating the mouse pointer below. For detailed instructions on editing your key bindings, see XMonad.Doc.Extending. | |||||||||||||||||||||||||
Cycling nearby or nth window into current frame | |||||||||||||||||||||||||
Cycle windows into focus from below or above the focused pane by pressing a key while one or more modifier keys is held down. The window order isn't changed until a modifier is released, leaving the previously focused window just below the new one, (or above if the window just above is chosen.) For best results use the same modifier + key combination as the one used to invoke the "bring from below" action. Also, once cycling, pressing a number key n will focus the nth window, with 0 being the one originally focused. | |||||||||||||||||||||||||
cycleRecentWindows | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
cycleStacks' | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Cycling half the stack to get rid of a boring window | |||||||||||||||||||||||||
Shifts the focused window as far as possible from the current focus, i.e. halfway around the stack. Windows above the focus up to the "opposite" position remain in place, while those above the insertion shift toward the current focus. This is useful for people who use lots of windows in Full, TwoPane, etc., to get rid of boring windows while cycling and swapping near the focus. | |||||||||||||||||||||||||
rotOpposite' :: Stack a -> Stack a | |||||||||||||||||||||||||
The opposite rotation on a Stack. | |||||||||||||||||||||||||
rotOpposite :: X () | |||||||||||||||||||||||||
Cycling windows through the current frame | |||||||||||||||||||||||||
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. | |||||||||||||||||||||||||
rotFocused' :: ([a] -> [a]) -> Stack a -> Stack a | |||||||||||||||||||||||||
The focused rotation on a stack. | |||||||||||||||||||||||||
rotFocusedUp :: X () | |||||||||||||||||||||||||
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 focused, the master is skipped. | |||||||||||||||||||||||||
rotFocusedDown :: X () | |||||||||||||||||||||||||
shiftToFocus' :: (Eq a, Show a, Read a) => a -> Stack a -> Stack a | |||||||||||||||||||||||||
Given a stack element and a stack, shift or insert the element (window) at the currently focused position. | |||||||||||||||||||||||||
Cycling windows through other frames | |||||||||||||||||||||||||
Rotate windows through the unfocused frames. This is similar to rotSlaves, from XMonad.Actions.RotSlaves, but excludes the current frame rather than master. | |||||||||||||||||||||||||
rotUnfocused' :: ([a] -> [a]) -> Stack a -> Stack a | |||||||||||||||||||||||||
The unfocused rotation on a stack. | |||||||||||||||||||||||||
rotUnfocusedUp :: X () | |||||||||||||||||||||||||
rotUnfocusedDown :: X () | |||||||||||||||||||||||||
Updating the mouse pointer | |||||||||||||||||||||||||
With FocusFollowsMouse == True, the focus is updated after binding actions, possibly focusing a window you didn't intend to focus. Most people using TwoPane probably already have a logHook causing the mouse to follow focus. (See XMonad.Actions.UpdatePointer, or XMonad.Actions.Warp) If you want this built into the key binding instead, use the appropriate action from one of those modules to also have your bindings move the pointer to the point of your choice on the current window: import XMonad.Actions.UpdatePointer -- or Actions.Warp and either -- modify the window rotation bindings , ((modm .|. controlMask, xK_i ), rotFocusedUp >> updatePointer (Relative 1 1)) , ((modm .|. controlMask, xK_u ), rotFocusedDown >> updatePointer (Relative 1 1)) -- or add to xmonad's logHook , logHook = dynamicLogWithPP xmobarPP >> updatePointer Nearest -- or your preference | |||||||||||||||||||||||||
Generic list rotations | |||||||||||||||||||||||||
Generic list rotations | |||||||||||||||||||||||||
rotUp :: [a] -> [a] | |||||||||||||||||||||||||
rotDown :: [a] -> [a] | |||||||||||||||||||||||||
Produced by Haddock version 2.7.2 |