XMonad.Actions.FlexibleManipulate

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

Copyright | (c) Michael Sloan
License | BSD3-style (see LICENSE)
Maintainer | <mgsloan@gmail.com>
Stability | stable
Portability | unportable
Safe Haskell | None
Language | Haskell2010

XMonad.Actions.FlexibleManipulate

Contents

- Usage

Description

Move and resize floating windows without warping the mouse.

Synopsis

- mouseWindow :: (Double -> Double) -> Window -> X ()
- discrete :: Double -> Double
- linear :: Double -> Double
- resize :: Double -> Double
- position :: Double -> Double

# Usage

First, add this import to your `xmonad.hs`:

    import qualified XMonad.Actions.FlexibleManipulate as Flex

Now set up the desired mouse binding, for example:

        , ((modm, button1), (\w -> focus w >> Flex.mouseWindow Flex.linear w))

- Flex.`linear` indicates that positions between the edges and the middle indicate a combination scale/position.
- Flex.`discrete` indicates that there are discrete pick regions. (The window is divided by thirds for each axis.)
- Flex.`resize` performs only a resize of the window, based on which quadrant the mouse is in.
- Flex.`position` is similar to the built-in `mouseMoveWindow`.

You can also write your own function for this parameter. It should take a value between 0 and 1 indicating position, and return a value indicating the corresponding position if plain Flex.`linear` was used.

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

mouseWindow :: (Double -> Double) -> Window -> X () #

Given an interpolation function, implement an appropriate window manipulation action.

discrete :: Double -> Double #

Manipulate the window based on discrete pick regions; the window is divided into regions by thirds along each axis.

linear :: Double -> Double #

Scale/reposition the window by factors obtained from the mouse position by linear interpolation. Dragging precisely on a corner resizes that corner; dragging precisely in the middle moves the window without resizing; anything else is an interpolation between the two.

resize :: Double -> Double #

Only resize the window, based on the window quadrant the mouse is in.

position :: Double -> Double #

Only reposition the window.