xmonad-contrib-0.8: Third party extensions for xmonadSource codeContentsIndex
MaintainerMarco Túlio Gontijo e Silva <marcot@riseup.net>
Data types
Navigating through workspaces

This module has functions to navigate through workspaces in a bidimensional manner. It allows the organization of workspaces in lines, and provides functions to move and shift windows in all four directions (left, up, right and down) possible in a surface.

This functionality was inspired by GNOME (finite) and KDE (infinite) keybindings for workspace navigation, and by XMonad.Actions.CycleWS for the idea of applying this approach to XMonad.

data Direction
= ToLeft
| ToUp
| ToRight
| ToDown
data Limits
= Finite
| Circular
| Linear
data Lines
= GConf
| Lines Int
planeShift :: Lines -> Limits -> Direction -> X ()
planeMove :: Lines -> Limits -> Direction -> X ()

You can use this module with the following in your ~/.xmonad/xmonad.hs file:

 import XMonad.Actions.Plane

 main = xmonad defaultConfig {keys = myKeys}

 myKeys conf = union (keys defaultConfig conf) $ myNewKeys conf

 myNewkeys (XConfig {modMask = m}) =
     [ ((keyMask .|. m, keySym), function (Lines 3) Finite direction)
     | (keySym, direction) <- zip [xK_Left .. xK_Down] $ enumFrom ToLeft
     , (keyMask, function) <- [(0, planeMove), (shiftMask, planeShift)]

For detailed instructions on editing your key bindings, see XMonad.Doc.Extending#Editing_key_bindings.

Data types
data Direction Source
Direction to go in the plane.
show/hide Instances
data Limits Source
Defines whether it's a finite or a circular organization of workspaces.
FiniteWhen you're at a edge of the plane, there's no way to move to the next region.
CircularIf you try to move, you'll get to the other edge, on the other side.
LinearThe plan comes as a row.
show/hide Instances
data Lines Source
The number of lines in which the workspaces will be arranged. It's possible to use a number of lines that is not a divisor of the number of workspaces, but the results are better when using a divisor. If it's not a divisor, the last line will have the remaining workspaces.
GConfUse gconftool-2 to find out the number of lines.
Lines IntSpecify the number of lines explicity.
Navigating through workspaces
planeShift :: Lines -> Limits -> Direction -> X ()Source
Shift a window to the next workspace in Direction. Note that this will also move to the next workspace.
planeMove :: Lines -> Limits -> Direction -> X ()Source
Move to the next workspace in Direction.
Produced by Haddock version 2.3.0