xmonad-contrib-0.11.3: Third party extensions for xmonad

Copyright | (c) 2009 Nils Schweinsberg
License | BSD3-style (see LICENSE)
Maintainer | Nils Schweinsberg <mail@n-sch.de>
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell98

XMonad.Hooks.ScreenCorners

Contents

- Usage
- Adding screen corners
- Event hook

Description

Run `X ()` actions by touching the edge of your screen with your mouse.

Synopsis

- data ScreenCorner
  - = SCUpperLeft
  - | SCUpperRight
  - | SCLowerLeft
  - | SCLowerRight
- addScreenCorner :: ScreenCorner -> X () -> X ()
- addScreenCorners :: [(ScreenCorner, X ())] -> X ()
- screenCornerEventHook :: Event -> X All

# Usage

This extension adds KDE-like screen corners to XMonad. By moving your cursor into one of your screen corners you can trigger an `X ()` action, for example `XMonad.Actions.GridSelect.goToSelected` or `XMonad.Actions.CycleWS.nextWS` etc.

To use it, import it on top of your `xmonad.hs`:

    import XMonad.Hooks.ScreenCorners

Then add your screen corners in our startup hook:

    myStartupHook = do
        ...
        addScreenCorner SCUpperRight (goToSelected defaultGSConfig { gs_cellwidth = 200})
        addScreenCorners [ (SCLowerRight, nextWS)
                         , (SCLowerLeft,  prevWS)
                         ]

And finally wait for screen corner events in your event hook:

    myEventHook e = do
        ...
        screenCornerEventHook e

# Adding screen corners

data ScreenCorner

Constructors

SCUpperLeft |
SCUpperRight |
SCLowerLeft |
SCLowerRight |

Instances

Eq ScreenCorner |
Ord ScreenCorner |
Show ScreenCorner |

addScreenCorner :: ScreenCorner -> X () -> X ()

Add one single `X ()` action to a screen corner

addScreenCorners :: [(ScreenCorner, X ())] -> X ()

Add a list of `(ScreenCorner, X ())` tuples

# Event hook

screenCornerEventHook :: Event -> X All

Handle screen corner events