<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>XMonad.Prompt.DirExec</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[ window.onload = function () {pageLoad();setSynopsis("mini_XMonad-Prompt-DirExec.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/XMonad-Prompt-DirExec.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">xmonad-contrib-0.9.2: Third party extensions for xmonad</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>unportable</td></tr><tr><th>Stability</th><td>unstable</td></tr><tr><th>Maintainer</th><td>juhe_xmonad@hck.sk</td></tr></table><p class="caption">XMonad.Prompt.DirExec</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Usage </a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A directory file executables prompt for XMonad. This might be useful if you don't want to have scripts in your PATH environment variable (same executable names, different behavior) - otherwise you might want to use <a href="XMonad-Prompt-Shell.html">XMonad.Prompt.Shell</a> instead - but you want to have easy access to these executables through the xmonad's prompt. </p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:dirExecPrompt">dirExecPrompt</a> :: <a href="XMonad-Prompt.html#t:XPConfig">XPConfig</a> -> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -> X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>) -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:FilePath">FilePath</a> -> X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:dirExecPromptNamed">dirExecPromptNamed</a> :: <a href="XMonad-Prompt.html#t:XPConfig">XPConfig</a> -> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -> X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>) -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -> X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li></ul></div><div id="interface"><h1 id="g:1">Usage </h1><div class="doc"><ol><li> In your <code>~/.xmonad/xmonad.hs</code>: </li></ol><pre> import XMonad.Prompt.DirExec </pre><ol><li> In your keybindings add something like: </li></ol><pre> , ("M-C-x", dirExecPrompt defaultXPConfig spawn "/home/joe/.scipts") </pre><p>or </p><pre> , ("M-C-x", dirExecPromptNamed defaultXPConfig spawn "/home/joe/.scripts" "My Scripts: ") </pre><p>or add this after your default bindings: </p><pre> ++ [ ("M-x " ++ key, dirExecPrompt defaultXPConfig fn "/home/joe/.scripts") | (key, fn) <- [ ("x", spawn), ("M-x", runInTerm "-hold") ] ] ++ </pre><p>The first alternative uses the last element of the directory path for a name of prompt. The second alternative uses the provided string for the name of the prompt. The third alternative defines 2 key bindings, first one spawns the program by shell, second one runs the program in terminal </p><p>For detailed instruction on editing the key binding see <a href="XMonad-Doc-Extending.html#Editing_key_bindings">XMonad.Doc.Extending</a>. </p></div><div class="top"><p class="src"><a name="v:dirExecPrompt" class="def">dirExecPrompt</a> :: <a href="XMonad-Prompt.html#t:XPConfig">XPConfig</a> -> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -> X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>) -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:FilePath">FilePath</a> -> X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/XMonad-Prompt-DirExec.html#dirExecPrompt" class="link">Source</a></p><div class="doc"><p>Function <code><a href="XMonad-Prompt-DirExec.html#v:dirExecPrompt">dirExecPrompt</a></code> starts the prompt with list of all executable files in directory specified by <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:FilePath">FilePath</a></code>. The name of the prompt is taken from the last element of the path. If you specify root directory - <code>/</code> - as the path, name <code>Root:</code> will be used as the name of the prompt instead. The <code><a href="XMonad-Prompt.html#t:XPConfig">XPConfig</a></code> parameter can be used to customize visuals of the prompt. The runner parameter specifies the function used to run the program - see usage for more information </p></div></div><div class="top"><p class="src"><a name="v:dirExecPromptNamed" class="def">dirExecPromptNamed</a> :: <a href="XMonad-Prompt.html#t:XPConfig">XPConfig</a> -> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -> X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>) -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -> X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/XMonad-Prompt-DirExec.html#dirExecPromptNamed" class="link">Source</a></p><div class="doc"><p>Function <code><a href="XMonad-Prompt-DirExec.html#v:dirExecPromptNamed">dirExecPromptNamed</a></code> does the same as <code><a href="XMonad-Prompt-DirExec.html#v:dirExecPrompt">dirExecPrompt</a></code> except the name of the prompt is specified by <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></code> parameter. </p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>