<!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.Actions.MessageFeedback</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-Actions-MessageFeedback.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/XMonad-Actions-MessageFeedback.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>None</td></tr></table><p class="caption">XMonad.Actions.MessageFeedback</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>Alternative to <code>XMonad.Operations.sendMessage</code> that provides knowledge of whether the message was handled, and utility functions based on this facility. </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:send">send</a> :: Message a => a -> X <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:tryMessage">tryMessage</a> :: (Message a, Message b) => a -> b -> X <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:tryMessage_">tryMessage_</a> :: (Message a, Message b) => a -> b -> 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:tryInOrder">tryInOrder</a> :: [SomeMessage] -> X <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:tryInOrder_">tryInOrder_</a> :: [SomeMessage] -> 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:sm">sm</a> :: Message a => a -> SomeMessage</li><li class="src short"><a href="#v:sendSM">sendSM</a> :: SomeMessage -> X <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:sendSM_">sendSM_</a> :: SomeMessage -> 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"><p>You can use this module with the following in your <code>~/.xmonad/xmonad.hs</code>: </p><pre> import XMonad.Actions.MessageFeedback </pre><p>You can then use this module's functions wherever an action is expected. </p><p>Note that most functions in this module have a return type of <code>X Bool</code> whereas configuration options will expect a <code>X ()</code> action. For example, the key binding </p><pre> -- Shrink the master area of a tiled layout, or move the focused window -- to the left in a WindowArranger-based layout ((modKey, xK_Left), tryMessage Shrink (MoveLeft 50)) </pre><p>is mis-typed. For this reason, this module provides alternatives (ending with an underscore, e.g. tryMessage_) that discard their result and return an <code>X ()</code>. For example, to correct the previous example: </p><pre> ((modKey, xK_Left), tryMessage_ Shrink (MoveLeft 50)) </pre></div><div class="top"><p class="src"><a name="v:send" class="def">send</a> :: Message a => a -> X <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a><a href="src/XMonad-Actions-MessageFeedback.html#send" class="link">Source</a></p><div class="doc"><p>Behaves like <code>XMonad.Operations.sendMessage</code>, but returns True of the message was handled by the layout, False otherwise. </p></div></div><div class="top"><p class="src"><a name="v:tryMessage" class="def">tryMessage</a> :: (Message a, Message b) => a -> b -> X <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a><a href="src/XMonad-Actions-MessageFeedback.html#tryMessage" class="link">Source</a></p><div class="doc"><p>Sends the first message, and if it was not handled, sends the second. Returns True if either message was handled, False otherwise. </p></div></div><div class="top"><p class="src"><a name="v:tryMessage_" class="def">tryMessage_</a> :: (Message a, Message b) => a -> b -> 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-Actions-MessageFeedback.html#tryMessage_" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:tryInOrder" class="def">tryInOrder</a> :: [SomeMessage] -> X <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a><a href="src/XMonad-Actions-MessageFeedback.html#tryInOrder" class="link">Source</a></p><div class="doc"><p>Tries sending every message of the list in order until one of them is handled. Returns True if one of the messages was handled, False otherwise. </p></div></div><div class="top"><p class="src"><a name="v:tryInOrder_" class="def">tryInOrder_</a> :: [SomeMessage] -> 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-Actions-MessageFeedback.html#tryInOrder_" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:sm" class="def">sm</a> :: Message a => a -> SomeMessage<a href="src/XMonad-Actions-MessageFeedback.html#sm" class="link">Source</a></p><div class="doc"><p>Convenience shorthand for <code>SomeMessage</code>. </p></div></div><div class="top"><p class="src"><a name="v:sendSM" class="def">sendSM</a> :: SomeMessage -> X <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a><a href="src/XMonad-Actions-MessageFeedback.html#sendSM" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:sendSM_" class="def">sendSM_</a> :: SomeMessage -> 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-Actions-MessageFeedback.html#sendSM_" class="link">Source</a></p></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>