XMonad.Actions.ConstrainedResize

xmonad-contrib-0.13: Third party extensions for xmonad

Copyright | (c) Dougal Stanton
License | BSD3-style (see LICENSE)
Maintainer | <dougal@dougalstanton.net>
Stability | stable
Portability | unportable
Safe Haskell | None
Language | Haskell98

XMonad.Actions.ConstrainedResize

Contents

- Usage

Description

Lets you constrain the aspect ratio of a floating window (by, say, holding shift while you resize).

Useful for making a nice circular XClock window.

Synopsis

- mouseResizeWindow :: Window -> Bool -> X ()

# Usage

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

    import qualified XMonad.Actions.ConstrainedResize as Sqr

Then add something like the following to your mouse bindings:

        , ((modm, button3),               (\w -> focus w >> Sqr.mouseResizeWindow w False))
        , ((modm .|. shiftMask, button3), (\w -> focus w >> Sqr.mouseResizeWindow w True ))

The line without the shiftMask replaces the standard mouse resize function call, so it's not completely necessary but seems neater this way.

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

mouseResizeWindow :: Window -> Bool -> X () #

Resize (floating) window with optional aspect ratio constraints.