xmonad-contrib-0.5: Third party extensions for xmonadSource codeContentsIndex
XMonad.Actions.MouseGestures
Portabilityunportable
Stabilityunstable
Maintainer<l.mai@web.de>
Contents
Usage
Description
Support for simple mouse gestures.
Synopsis
data Direction
= L
| U
| R
| D
mouseGesture :: Map [Direction] (Window -> X ()) -> Window -> X ()
Usage

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

 import XMonad.Actions.Commands
 import qualified XMonad.StackSet as W

then add an appropriate mouse binding:

     , ((modMask x .|. shiftMask, button3), mouseGesture gestures)

where gestures is a Map from gestures to actions on windows, for example:

     gestures = M.fromList
         [ ([], focus)
         , ([U], \w -> focus w >> windows W.swapUp)
         , ([D], \w -> focus w >> windows W.swapDown)
         , ([R, D], \_ -> sendMessage NextLayout)
         ]

This is just an example, of course; you can use any mouse button and gesture definitions you want.

For detailed instructions on editing your mouse bindings, see XMonad.Doc.Extending#Editing_mouse_bindings.

data Direction Source
The four cardinal screen directions. A "gesture" is a sequence of directions.
Constructors
L
U
R
D
show/hide Instances
mouseGesture :: Map [Direction] (Window -> X ()) -> Window -> X ()Source
Given a Map from lists of directions to actions with windows, figure out which one the user is performing, and return the corresponding action.
Produced by Haddock version 2.3.0