<!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.Commands</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-Commands.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-Commands.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.Commands</FONT ></TD ><TD ALIGN="right" ><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="infohead" >Portability</TD ><TD CLASS="infoval" >portable</TD ></TR ><TR ><TD CLASS="infohead" >Stability</TD ><TD CLASS="infoval" >stable</TD ></TR ><TR ><TD CLASS="infohead" >Maintainer</TD ><TD CLASS="infoval" >glasser@mit.edu</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" >Allows you to run internal xmonad commands (X () actions) using a dmenu menu in addition to key bindings. Requires dmenu and the Dmenu XMonad.Actions module. </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%3AcommandMap" >commandMap</A > :: [(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</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 >)] -> <A HREF="/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t%3AMap" >Map</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</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%3ArunCommand" >runCommand</A > :: [(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</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 >)] -> <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%3ArunCommand%27" >runCommand'</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</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%3AworkspaceCommands" >workspaceCommands</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/base-4.2.0.2/Data-Char.html#t%3AString" >String</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%3AscreenCommands" >screenCommands</A > :: [(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</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%3AdefaultCommands" >defaultCommands</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/base-4.2.0.2/Data-Char.html#t%3AString" >String</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.Commands </PRE ><P >Then add a keybinding to the runCommand action: </P ><PRE > , ((modm .|. controlMask, xK_y), commands >>= runCommand) </PRE ><P >and define the list of commands you want to use: </P ><PRE > commands :: X [(String, X ())] commands = defaultCommands </PRE ><P >Whatever key you bound to will now cause a popup menu of internal xmonad commands to appear. You can change the commands by changing the contents of the list returned by commands. (If you like it enough, you may even want to get rid of many of your other key bindings!) </P ><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:commandMap" ><A NAME="v%3AcommandMap" ></A ></A ><B >commandMap</B > :: [(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</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 >)] -> <A HREF="/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t%3AMap" >Map</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</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-Commands.html#commandMap" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Create a Data.Map.Map from <TT >String</TT >s to xmonad actions from a list of pairs. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:runCommand" ><A NAME="v%3ArunCommand" ></A ></A ><B >runCommand</B > :: [(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</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 >)] -> <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-Commands.html#runCommand" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Given a list of command/action pairs, prompt the user to choose a command and return the corresponding action. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:runCommand'" ><A NAME="v%3ArunCommand%27" ></A ></A ><B >runCommand'</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</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-Commands.html#runCommand%27" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Given the name of a command from <TT ><A HREF="XMonad-Actions-Commands.html#v%3AdefaultCommands" >defaultCommands</A ></TT >, return the corresponding action (or the null action if the command is not found). </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:workspaceCommands" ><A NAME="v%3AworkspaceCommands" ></A ></A ><B >workspaceCommands</B > :: <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/base-4.2.0.2/Data-Char.html#t%3AString" >String</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-Commands.html#workspaceCommands" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Generate a list of commands to switch to/send windows to workspaces. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:screenCommands" ><A NAME="v%3AscreenCommands" ></A ></A ><B >screenCommands</B > :: [(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString" >String</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-Commands.html#screenCommands" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Generate a list of commands dealing with multiple screens. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:defaultCommands" ><A NAME="v%3AdefaultCommands" ></A ></A ><B >defaultCommands</B > :: <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/base-4.2.0.2/Data-Char.html#t%3AString" >String</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-Commands.html#defaultCommands" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >A nice pre-defined list of commands. </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 >