<!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.AppendFile</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-AppendFile.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/XMonad-Prompt-AppendFile.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.11: 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>stable</td></tr><tr><th>Maintainer</th><td><byorgey@gmail.com></td></tr><tr><th>Safe Haskell</th><td>Safe-Infered</td></tr></table><p class="caption">XMonad.Prompt.AppendFile</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 prompt for appending a single line of text to a file. Useful for keeping a file of notes, things to remember for later, and so on--- using a keybinding, you can write things down just about as quickly as you think of them, so it doesn't have to interrupt whatever else you're doing. </p><p>Who knows, it might be useful for other purposes as well! </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:appendFilePrompt">appendFilePrompt</a> :: <a href="XMonad-Prompt.html#t:XPConfig">XPConfig</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:AppendFile">AppendFile</a> </li></ul></div><div id="interface"><h1 id="g:1">Usage </h1><div class="doc"><p>You can use this module by importing it, along with <a href="XMonad-Prompt.html">XMonad.Prompt</a>, into your ~/.xmonad/xmonad.hs file: </p><pre> import XMonad.Prompt import XMonad.Prompt.AppendFile </pre><p>and adding an appropriate keybinding, for example: </p><pre> , ((modm .|. controlMask, xK_n), appendFilePrompt defaultXPConfig "/home/me/NOTES") </pre><p>Additional notes can be added via regular Haskell or XMonad functions; for example, to preface notes with the time they were made, one could write a binding like </p><pre> , ((modm .|. controlMask, xK_n), do spawn ("date>>"++"/home/me/NOTES") appendFilePrompt defaultXPConfig "/home/me/NOTES" ) </pre><p>(Put the spawn on the line after the prompt to append the time instead.) </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></div><div class="top"><p class="src"><a name="v:appendFilePrompt" class="def">appendFilePrompt</a> :: <a href="XMonad-Prompt.html#t:XPConfig">XPConfig</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/XMonad-Prompt-AppendFile.html#appendFilePrompt" class="link">Source</a></p><div class="doc"><p>Given an XPrompt configuration and a file path, prompt the user for a line of text, and append it to the given file. </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:AppendFile" class="def">AppendFile</a> <a href="src/XMonad-Prompt-AppendFile.html#AppendFile" class="link">Source</a></p><div class="subs instances"><p id="control.i:AppendFile" class="caption collapser" onclick="toggleSection('i:AppendFile')">Instances</p><div id="section.i:AppendFile" class="show"><table><tr><td class="src"><a href="XMonad-Prompt.html#t:XPrompt">XPrompt</a> <a href="XMonad-Prompt-AppendFile.html#t:AppendFile">AppendFile</a></td><td class="doc empty"> </td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>