xmonad-contrib-0.11.1: Third party extensions for xmonad

Portability | portable
Stability | stable
Maintainer | Robert Marlow <robreim@bobturf.org>
Safe Haskell | None

XMonad.Actions.UpdatePointer

Contents

- Usage

Description

Causes the pointer to follow whichever window focus changes to. Compliments the idea of switching focus as the mouse crosses window boundaries to keep the mouse near the currently focused window

Synopsis

- updatePointer :: PointerPosition -> X ()
- data PointerPosition
  - = Nearest
  - | Relative Rational Rational
  - | TowardsCentre Rational Rational

# Usage

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

     import XMonad
     import XMonad.Actions.UpdatePointer

Enable it by including it in your logHook definition. Eg:

     logHook = updatePointer Nearest

which will move the pointer to the nearest point of a newly focused window, or

     logHook = updatePointer (Relative 0.5 0.5)

which will move the pointer to the center of a newly focused window.

To use this with an existing logHook, use >> :

     logHook = dynamicLog
               >> updatePointer (Relative 1 1)

which moves the pointer to the bottom-right corner of the focused window.

updatePointer :: PointerPosition -> X ()

Update the pointer's location to the currently focused window or empty screen unless it's already there, or unless the user was changing focus with the mouse

data PointerPosition

Constructors

Nearest |
Relative Rational Rational |
TowardsCentre Rational Rational |

Instances

Read PointerPosition |
Show PointerPosition |