<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--Rendered using the Haskell Html Library v0.2--> <HTML ><HEAD ><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" ><TITLE >XMonad.Actions.ConstrainedResize</TITLE ><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css" ><SCRIPT SRC="haddock-util.js" TYPE="text/javascript" ></SCRIPT ><SCRIPT TYPE="text/javascript" >window.onload = function () {setSynopsis("mini_XMonad-Actions-ConstrainedResize.html")};</SCRIPT ></HEAD ><BODY ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="topbar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" " ></TD ><TD CLASS="title" >xmonad-contrib-0.9.1: Third party extensions for xmonad</TD ><TD CLASS="topbut" ><A HREF="src/XMonad-Actions-ConstrainedResize.html" >Source code</A ></TD ><TD CLASS="topbut" ><A HREF="index.html" >Contents</A ></TD ><TD CLASS="topbut" ><A HREF="doc-index.html" >Index</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="modulebar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><FONT SIZE="6" >XMonad.Actions.ConstrainedResize</FONT ></TD ><TD ALIGN="right" ><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="infohead" >Portability</TD ><TD CLASS="infoval" >unportable</TD ></TR ><TR ><TD CLASS="infohead" >Stability</TD ><TD CLASS="infoval" >stable</TD ></TR ><TR ><TD CLASS="infohead" >Maintainer</TD ><TD CLASS="infoval" ><dougal@dougalstanton.net></TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="section4" ><B >Contents</B ></TD ></TR ><TR ><TD ><DL ><DT ><A HREF="#1" >Usage </A ></DT ></DL ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Description</TD ></TR ><TR ><TD CLASS="doc" ><P >Lets you constrain the aspect ratio of a floating window (by, say, holding shift while you resize). </P ><P >Useful for making a nice circular XClock window. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Synopsis</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A HREF="#v%3AmouseResizeWindow" >mouseResizeWindow</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AWindow" >Window</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool" >Bool</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX" >X</A > <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="1" ><A NAME="1" >Usage </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="doc" ><P >You can use this module with the following in your <TT >~/.xmonad/xmonad.hs</TT >: </P ><PRE > import qualified XMonad.Actions.ConstrainedResize as Sqr </PRE ><P >Then add something like the following to your mouse bindings: </P ><PRE > , ((modm, button3), (\w -> focus w >> Sqr.mouseResizeWindow w False)) , ((modm .|. shiftMask, button3), (\w -> focus w >> Sqr.mouseResizeWindow w True )) </PRE ><P >The line without the shiftMask replaces the standard mouse resize function call, so it's not completely necessary but seems neater this way. </P ><P >For detailed instructions on editing your mouse bindings, see <A HREF="XMonad-Doc-Extending.html#Editing_mouse_bindings" >XMonad.Doc.Extending</A >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:mouseResizeWindow" ><A NAME="v%3AmouseResizeWindow" ></A ></A ><B >mouseResizeWindow</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AWindow" >Window</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool" >Bool</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX" >X</A > <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ><TD CLASS="declbut" ><A HREF="src/XMonad-Actions-ConstrainedResize.html#mouseResizeWindow" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Resize (floating) window with optional aspect ratio constraints. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="botbar" >Produced by <A HREF="http://www.haskell.org/haddock/" >Haddock</A > version 2.6.1</TD ></TR ></TABLE ></BODY ></HTML >