mmagorsc/taskmonad

View on GitHub
docs/GridSelect-Extras.html

Summary

Maintainability
Test Coverage
<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="shortcut icon" type="image/x-icon" href="images/taskmonad.ico">

    <link href="css/ocean.css" rel="stylesheet" type="text/css" title="new-ocean" />
    
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <link href="css/lightbox.min.css" rel="stylesheet">
    <link href="css/custom.css" rel="stylesheet">
    
    <title>TaskMonad: xmonad + taskwarrior</title>
  </head>
  <body>
    
    
    <a href="https://github.com/mmagorsc/taskmonad/" style="position: absolute;top: 0;right: 0;border: 0;"><img width="149" height="149" src="https://github.blog/wp-content/uploads/2008/12/forkme_right_darkblue_121621.png?resize=149%2C149" class="attachment-full size-full" alt="Fork me on GitHub" data-recalc-dims="1"></a>


    
<div class="container" style="padding-left:66px;padding-right:110px;padding-top:30px;">


  <div class="row">

    <div class="col-sm-3" style="width:100%;padding-right:40px;padding-left: 10px;padding-top:10px;">
<img src="./images/taskmonad.png" style="width:100%;margin-bottom:10px;">

<!-- Place this tag where you want the button to render. -->
<div style="margin-top:10px;margin-bottom:10px;"><a class="github-button" href="https://github.com/mmagorsc/taskmonad/" data-size="large" aria-label="Star ntkme/github-buttons on GitHub">Star</a>
<a class="github-button" href="https://github.com/mmagorsc/taskmonad/releases" data-icon="octicon-cloud-download" data-size="large" aria-label="Download ntkme/github-buttons on GitHub">Download</a></div>

<p style="overflow-wrap: break-word; font-family: Georgia, serif; font-size: 14px; line-height: 1.5;color: #555;">
  Taskmonad is a collection of tools which can be used to access
  taskwarrior from xmonad.
</p>



<h3 style="font-family: Georgia, serif;color: #444;font-size: 24px;font-weight: normal;">Page Content</h3>


<ul style="list-style: none;margin: 10px 0;">
  <li><a class="dotted-link" href="#g:1">Usage</a></li>
  <li><a style="margin-left:20px;" class="dotted-link" href="#g:2">Screenshots</a></li>
  <li><a style="margin-left:20px;" class="dotted-link" href="#g:3">Customizing</a></li>
  <li><a class="dotted-link" href="#g:4">Configuration</a></li>
</ul>

<h3 style="margin-top:30px;font-family: Georgia, serif;color: #444;font-size: 24px;font-weight: normal;">Modules</h3>

<ul style="list-style: none;margin: 10px 0;">
  <li><a class="dotted-link" href="index.html">TaskMonad</a></li>
  <li><a style="margin-left:20px;" class="dotted-link" href="TaskMonad-Prompt.html">TaskMonad.Prompt</a></li>
  <li><a style="margin-left:20px;" class="dotted-link" href="TaskMonad-GridSelect.html">TaskMonad.GridSelect</a></li>
  <li><a style="margin-left:20px;" class="dotted-link" href="TaskMonad-Scratchpad.html">TaskMonad.Scratchpad</a></li>
  <li><a style="margin-left:20px;" class="dotted-link" href="TaskMonad-Utils.html">TaskMonad.Utils</a></li>
  <li><a class="dotted-link" href="GridSelect-Extras.html">GridSelect.Extras</a></li>
</ul>

<h3 style="margin-top:30px;font-family: Georgia, serif;color: #444;font-size: 24px;font-weight: normal;">Information</h3>

<ul style="list-style: none;margin: 10px 0;">
  <li><a class="copyright-link"><strong>Copyright</strong></a></li>
  <li><a style="margin-left:20px;" class="copyright-link">Clemens Fruhwirth</a></li>
  <li><a style="margin-left:20px;" class="copyright-link">&lt;clemens@endorphin.org&gt;,</a></li>  
  <li><a style="margin-left:20px;" class="copyright-link">Max Magorsch</a></li>
  <li><a style="margin-left:20px;" class="copyright-link">&lt;max@magorsch.de&gt;</a></li>
  <li><a class="copyright-link"><strong>License</strong></a></li>
  <li><a style="margin-left:20px;" class="copyright-link">BSD-style</a></li>
  <li><a style="margin-left:20px;" class="copyright-link">(see License)</a></li>
  <li><a class="copyright-link"><strong>Maintainer</strong></a></li>
  <li><a style="margin-left:20px;" class="copyright-link">Max Magorsch</a></li>
  <li><a style="margin-left:20px;" class="copyright-link">&lt;max@magorsch.de&gt;</a></li>
</ul>

</div>

    <div class="col-sm-9">  
      <h1>GridSelect.Extras</h1>

      <p style="font-family: Georgia, serif; font-size: 17px;margin-top:17px;">Release v1.0.1 (<a class="reference internal" href="src/GridSelect.Extras.html"><span class=" std std-ref">Source</span></a>)</p>

<a href="https://www.haskell.org/ghc/" ><img src="https://img.shields.io/badge/ghc-8.4.1%2B-blue.svg"></a>
<a href="https://travis-ci.org/mmagorsc/taskmonad"> <img src="https://api.travis-ci.org/mmagorsc/taskmonad.svg?branch=master"></a>
<a href="http://hackage.haskell.org/package/TaskMonad-1.0.1"> <img src="https://img.shields.io/badge/hackage-1.0.1-brightgreen.svg"></a>
<a href="https://codeclimate.com/github/mmagorsc/taskmonad"> <img src="https://api.codeclimate.com/v1/badges/e4de6996bf5bb710d0e7/maintainability"></a>
<a href="https://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/license-BSD-blue.svg"></a>
      <p style="margin-top:30px; margin-bottom:17px; font-family: Georgia, serif;font-size: 17px;color: #3E4349;"><b>GridSelect.Extras</b> adds a method to <a href="http://hackage.haskell.org/package/xmonad-contrib-0.15/docs/XMonad-Actions-GridSelect.html">XMonad.Actions.GridSelect</a>
 that displays a message at the top of the screen while using the normal GridSelect. </p>




<div id="content"><h1>Usage</h1></a><div class="doc"><p>You can use this module with the following in your <code>~/.xmonad/xmonad.hs</code>:</p><pre>   import qualified GridSelect.Extras</pre><p>Then add a keybinding, e.g.</p><pre>   , ((modm, xK_g), gridselect gsconfig message actions)
        where
           gridselect = GridSelect.Extras.runSelectedActionWithMessage
           gsconfig   = GridSelect.Extras.def
           message    = "Please choose an option:"
           actions    = [ ("Option #1", unsafeSpawn "notify-send 'Option #1'"),
                          ("Option #2", unsafeSpawn "notify-send 'Option #2'") ]</pre><p>This module also supports displaying an icon in the message window. To do so, just use <code><a href="GridSelect-Extras.html#v:runSelectedActionWithMessageAndIcon" title="GridSelect.Extras">runSelectedActionWithMessageAndIcon</a></code> like so:</p><pre>   , ((modm, xK_g), gridselect gsconfig message icon actions)
        where
            gridselect = GridSelect.Extras.runSelectedActionWithMessageAndIcon
            icon       = [[True,  False, False],
                          [False, True,  False],
                          [True,  False, True ]]
    -- ...  </pre></div><div class="top"><p class="src"><a id="v:runSelectedActionWithMessageAndIcon" class="def">runSelectedActionWithMessageAndIcon</a> :: <a href="GridSelect-Extras.html#t:GSConfig" title="GridSelect.Extras">GSConfig</a> (X ()) -&gt; String -&gt; [[Bool]] -&gt; [(String, X ())] -&gt; X () <a href="src/GridSelect.Extras.html#runSelectedActionWithMessageAndIcon" class="link">Source</a> <a href="#v:runSelectedActionWithMessageAndIcon" class="selflink">#</a></p><div class="doc"><p>Select an action and run it in the X monad. Furthermore display a message on top of the screen.</p></div></div><a href="#g:2" id="g:2"><h2>Screenshots</h2></a><div class="doc"><p>Selecting an action:</p><p>
    <a href="images/gridselect-extras.png" data-lightbox="example-1">
      <img style="width:100%" src="images/gridselect-extras.png" alt="GridSelect Extras">
    </a>
</p></div><a href="#g:3" id="g:3"><h2>Customizing</h2></a><div class="doc"><p>It is possible to customize GridSelect.Extras the same way GridSelect is customized. Please refer to the <a href="http://hackage.haskell.org/package/xmonad-contrib-0.15/docs/XMonad-Actions-GridSelect.html">GridSelect Documentation</a> for further information.</p></div><a href="#g:4" id="g:4"><h1>Configuration</h1></a><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:GSConfig" class="def">GSConfig</a> a <a href="src/GridSelect.Extras.html#GSConfig" class="link">Source</a> <a href="#t:GSConfig" class="selflink">#</a></p><div class="doc"><p>The <code>Default</code> instance gives a basic configuration for <code>gridselect</code>, with
 the colorizer chosen based on the type.</p><p>If you want to replace the <code><a href="GridSelect-Extras.html#v:gs_colorizer" title="GridSelect.Extras">gs_colorizer</a></code> field, use <code><a href="GridSelect-Extras.html#v:buildDefaultGSConfig" title="GridSelect.Extras">buildDefaultGSConfig</a></code>
 instead of <code><a href="GridSelect-Extras.html#v:def" title="GridSelect.Extras">def</a></code> to avoid ambiguous type variables.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tbody><tr><td class="src"><a id="v:GSConfig" class="def">GSConfig</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:gs_cellheight" class="def">gs_cellheight</a> :: Integer</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:gs_cellwidth" class="def">gs_cellwidth</a> :: Integer</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:gs_cellpadding" class="def">gs_cellpadding</a> :: Integer</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:gs_colorizer" class="def">gs_colorizer</a> :: a -&gt; Bool -&gt; X (String, String)</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:gs_font" class="def">gs_font</a> :: String</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:gs_navigate" class="def">gs_navigate</a> :: TwoD a (Maybe a)</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:gs_rearranger" class="def">gs_rearranger</a> :: Rearranger a</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:gs_originFractX" class="def">gs_originFractX</a> :: Double</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:gs_originFractY" class="def">gs_originFractY</a> :: Double</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:gs_bordercolor" class="def">gs_bordercolor</a> :: String</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr></tbody></table></div><div class="subs instances"><details id="i:GSConfig" open="open"><summary>Instances</summary><table><tbody><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle expander" data-details-id="i:id:GSConfig:Default:1"></span> HasColorizer a =&gt; Default (<a href="GridSelect-Extras.html#t:GSConfig" title="GridSelect.Extras">GSConfig</a> a)</span> <a href="src/GridSelect.Extras.html#line-140" class="link">Source</a> <a href="#t:GSConfig" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:GSConfig:Default:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GridSelect-Extras.html">GridSelect.Extras</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:def">def</a> :: <a href="GridSelect-Extras.html#t:GSConfig" title="GridSelect.Extras">GSConfig</a> a <a href="#v:def" class="selflink">#</a></p></div></details></td></tr></tbody></table></details></div></div><div class="top"><p class="src"><a id="v:def" class="def">def</a> :: Default a =&gt; a <a href="#v:def" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:buildDefaultGSConfig" class="def">buildDefaultGSConfig</a> :: (a -&gt; Bool -&gt; X (String, String)) -&gt; <a href="GridSelect-Extras.html#t:GSConfig" title="GridSelect.Extras">GSConfig</a> a <a href="src/GridSelect.Extras.html#buildDefaultGSConfig" class="link">Source</a> <a href="#v:buildDefaultGSConfig" class="selflink">#</a></p><div class="doc"><p>Builds a default gs config from a colorizer function.</p></div></div><div class="top"><p class="src"><a id="v:defaultNavigation" class="def">defaultNavigation</a> :: TwoD a (Maybe a) <a href="src/GridSelect.Extras.html#defaultNavigation" class="link">Source</a> <a href="#v:defaultNavigation" class="selflink">#</a></p><div class="doc"><p>By default gridselect used the defaultNavigation action, which
 binds left,right,up,down and vi-style h,l,j,k navigation. Return
 quits gridselect, returning the selected element, while Escape
 cancels the selection. Slash enters the substring search mode. In
 substring search mode, every string-associated keystroke is
 added to a search string, which narrows down the object
 selection. Substring search mode comes back to regular navigation
 via Return, while Escape cancels the search. If you want that
 navigation style, add <code><a href="GridSelect-Extras.html#v:defaultNavigation" title="GridSelect.Extras">defaultNavigation</a></code> as <code><a href="GridSelect-Extras.html#v:gs_navigate" title="GridSelect.Extras">gs_navigate</a></code> to your
      <code><a href="GridSelect-Extras.html#t:GSConfig" title="GridSelect.Extras">GSConfig</a></code> object. This is done by <code><a href="GridSelect-Extras.html#v:buildDefaultGSConfig" title="GridSelect.Extras">buildDefaultGSConfig</a></code> automatically.</p></div></div></div></div>


    </div>
  </div>
</div>
    
    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

    <!-- GitHub Buttons -->
    <script async defer src="https://buttons.github.io/buttons.js"></script>

    <script src="js/lightbox-plus-jquery.min.js"></script>
    
  </body>
</html>