xmonad-contrib-0.17.1: Community-maintained extensions for xmonad

Copyright | (c) 2014 Anders Engstrom <ankaan@gmail.com>
License | BSD3-style (see LICENSE)
Maintainer | Anders Engstrom <ankaan@gmail.com>
Stability | unstable
Portability | unportable
Safe Haskell | Safe-Inferred
Language | Haskell2010

XMonad.Actions.AfterDrag

Contents

- Usage

Description

Perform an action after the current mouse drag is completed.

Synopsis

- afterDrag :: X () -> X ()
- ifClick :: X () -> X ()
- ifClick' :: Int -> X () -> X () -> X ()

# Usage

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

       import XMonad.Actions.AfterDrag

Then add appropriate mouse bindings, for example:

           , ((modm, button3), (\w -> focus w >> mouseResizeWindow w >> ifClick (windows $ W.float w $ W.RationalRect 0 0 1 1)))

This will allow you to resize windows as usual, but if you instead of draging click the mouse button the window will be automatically resized to fill the whole screen.

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

More practical examples are available in XMonad.Actions.FloatSnap.

afterDrag #

Arguments

:: X () | The task to schedule.
-> X () |

Schedule a task to take place after the current dragging is completed.

ifClick #

Arguments

:: X () | The action to take if the dragging turned out to be a click.
-> X () |

Take an action if the current dragging can be considered a click, supposing the drag just started before this function is called. A drag is considered a click if it is completed within 300 ms.

ifClick' #

Arguments

:: Int | Maximum time of dragging for it to be considered a click (in milliseconds.)
-> X () | The action to take if the dragging turned out to be a click.
-> X () | The action to take if the dragging turned out to not be a click.
-> X () |

Take an action if the current dragging is completed within a certain time (in milliseconds.)