<!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.FloatKeys</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-FloatKeys.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-FloatKeys.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.FloatKeys</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" >Karsten Schoelzel <kuser@gmx.de></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" >Move and resize floating windows. </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%3AkeysMoveWindow" >keysMoveWindow</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Operations.html#t%3AD" >D</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/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 ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AkeysMoveWindowTo" >keysMoveWindowTo</A > :: P -> G -> <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/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 ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AkeysResizeWindow" >keysResizeWindow</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Operations.html#t%3AD" >D</A > -> G -> <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/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 ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AkeysAbsResizeWindow" >keysAbsResizeWindow</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Operations.html#t%3AD" >D</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Operations.html#t%3AD" >D</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/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 XMonad.Actions.FloatKeys </PRE ><P >Then add appropriate key bindings, for example: </P ><PRE > , ((modm, xK_d ), withFocused (keysResizeWindow (-10,-10) (1,1))) , ((modm, xK_s ), withFocused (keysResizeWindow (10,10) (1,1))) , ((modm .|. shiftMask, xK_d ), withFocused (keysAbsResizeWindow (-10,-10) (1024,752))) , ((modm .|. shiftMask, xK_s ), withFocused (keysAbsResizeWindow (10,10) (1024,752))) , ((modm, xK_a ), withFocused (keysMoveWindowTo (512,384) (1%2,1%2))) </PRE ><P >For detailed instructions on editing your key bindings, see <A HREF="XMonad-Doc-Extending.html#Editing_key_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:keysMoveWindow" ><A NAME="v%3AkeysMoveWindow" ></A ></A ><B >keysMoveWindow</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Operations.html#t%3AD" >D</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/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-FloatKeys.html#keysMoveWindow" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" ><TT >keysMoveWindow (dx, dy)</TT > moves the window by <TT >dx</TT > pixels to the right and <TT >dy</TT > pixels down. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:keysMoveWindowTo" ><A NAME="v%3AkeysMoveWindowTo" ></A ></A ><B >keysMoveWindowTo</B > :: P -> G -> <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/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-FloatKeys.html#keysMoveWindowTo" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >keysMoveWindowTo (x, y) (gx, gy)</TT > moves the window relative point <TT >(gx, gy)</TT > to the point <TT >(x,y)</TT >, where <TT >(gx,gy)</TT > gives a position relative to the window border, i.e. <TT >gx = 0</TT > is the left border, <TT >gx = 1</TT > is the right border, <TT >gy = 0</TT > is the top border, and <TT >gy = 1</TT > the bottom border. </P ><P >For example, on a 1024x768 screen: </P ><PRE > keysMoveWindowTo (512,384) (1%2, 1%2) -- center the window on screen keysMoveWindowTo (1024,0) (1, 0) -- put window in the top right corner </PRE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:keysResizeWindow" ><A NAME="v%3AkeysResizeWindow" ></A ></A ><B >keysResizeWindow</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Operations.html#t%3AD" >D</A > -> G -> <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/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-FloatKeys.html#keysResizeWindow" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >keysResizeWindow (dx, dy) (gx, gy)</TT > changes the width by <TT >dx</TT > and the height by <TT >dy</TT >, leaving the window-relative point <TT >(gx, gy)</TT > fixed. </P ><P >For example: </P ><PRE > keysResizeWindow (10, 0) (0, 0) -- make the window 10 pixels larger to the right keysResizeWindow (10, 0) (0, 1%2) -- does the same, unless sizeHints are applied keysResizeWindow (10, 10) (1%2, 1%2) -- add 5 pixels on each side keysResizeWindow (-10, -10) (0, 1) -- shrink the window in direction of the bottom-left corner </PRE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:keysAbsResizeWindow" ><A NAME="v%3AkeysAbsResizeWindow" ></A ></A ><B >keysAbsResizeWindow</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Operations.html#t%3AD" >D</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Operations.html#t%3AD" >D</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/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-FloatKeys.html#keysAbsResizeWindow" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >keysAbsResizeWindow (dx, dy) (ax, ay)</TT > changes the width by <TT >dx</TT > and the height by <TT >dy</TT >, leaving the screen absolute point <TT >(ax, ay)</TT > fixed. </P ><P >For example: </P ><PRE > keysAbsResizeWindow (10, 10) (0, 0) -- enlarge the window; if it is not in the top-left corner it will also be moved down and to the right. </PRE ></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 >