mmagorsc/taskmonad

View on GitHub
docs/index.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">Installation</a></li>
  <li><a class="dotted-link" href="#g:1c">Usage</a></li>
  <li><a class="dotted-link" href="#g:2">Step 1: Capture</a></li>
  <li><a class="dotted-link" href="#g:3">Step 2 &amp; 3: Clarify &amp; Organize</a></li>
  <li><a class="dotted-link" href="#g:4">Step 4: Reflect</a></li>
  <li><a class="dotted-link" href="#g:5">Step 5: Engage</a></li>
  <li><a class="dotted-link" href="#g:6">Scratchpad</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">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"> <!-- style="background-color:#C8C8C8;"> -->
      <h1>TaskMonad: xmonad + taskwarrior</h1>

      <p style="font-family: Georgia, serif; font-size: 17px;margin-top:17px;">Release v1.0.1 (<a class="reference internal" href="src/TaskMonad.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>TaskMonad</b> is a collection of tools which can be used to access taskwarrior from xmonad.</p>

<video id="screencast" style="width:100%;margin-bottom:50px;">
  <source src="./images/taskmonad-screencast.mp4">
  Your browser does not support the video tag.
</video> 


<div id="content"><div id="synopsis"><details id="syn"><summary>Synopsis</summary><ul class="details-toggle" data-details-id="syn"><li class="src short"><a href="#v:taskwarriorPrompt">taskwarriorPrompt</a> :: [(String -&gt; Bool, X ())] -&gt; X ()</li><li class="src short"><a href="#v:processInbox">processInbox</a> :: X ()</li><li class="src short"><a href="#v:togglePriority">togglePriority</a> :: String -&gt; X ()</li><li class="src short"><a href="#v:taskSelect">taskSelect</a> :: String -&gt; X ()</li><li class="src short"><a href="#v:dueSelect">dueSelect</a> :: X ()</li><li class="src short"><a href="#v:tagSelect">tagSelect</a> :: X ()</li><li class="src short"><a href="#v:projectSelect">projectSelect</a> :: X ()</li><li class="src short"><a href="#v:taskwarriorScratchpads">taskwarriorScratchpads</a> :: [NamedScratchpad]</li><li class="src short"><a href="#v:taskwarriorScratchpad">taskwarriorScratchpad</a> :: X ()</li></ul></details></div>

  <a href="#g:1" id="g:1"><h1>Installation</h1></a>
  <a href="#g:1a" id="g:1a"><h2>Install with Cabal</h2></a>
  <div class="doc"><p>To install TaskMonad from hackage just execute:</p>
    <pre>$ cabal update <br>$ cabal install TaskMonad</pre><p>Afterwards import TaskMonad in your `xmonad.hs`  </p><pre>import TaskMonad</pre></div>
  <a href="#g:1b" id="g:1b"><h2>Install without Cabal</h2></a>
  <div class="doc"><p>To install Taskmonad without using cabal just download and copy the source code into your `~<em>.xmonad</em>-- lib/` folder. The folder structure should afterwards look like this:</p><pre>.xmonad 
|-- lib
|   |-- Taskmonad.hs
|   |-- Taskmonad
|   |   |-- GridSelect.hs
|   |   |-- Prompt.hs
|   |   |-- ScratchPad.hs
|   |   `-- Utils.hs
|   |-- GridSelect
|   |   `-- Extras.hs
|   `-- ...
|-- xmonad.hs</pre><p>Afterwards import TaskMonad in your `xmonad.hs`  </p><pre>import TaskMonad</pre></div>
  

    <a href="#g:1c" id="g:1c"><h1>Usage</h1></a></a>

<div class="doc"><p>To get started, add a manage hook for the taskwarrior scratchpad:</p><pre>import TaskMonad

-- ...

... , manageHook = namedScratchpadManageHook taskwarriorScratchpads</pre><p>After that you can bind the taskwarrior prompt to a key to get started: </p><pre>... , ("M-p",     taskwarriorPrompt [(\x -&gt; x == "processInbox", processInbox)])</pre><p>You can also bind any other TaskMonad action to a key. For example:</p><pre>... , ("M-S-p",   taskwarriorScratchpad)       -- Opens the taskwarrior scratchpad

... , ("M-C-p",   taskSelect "status:pending") -- Displays all pending tasks

... , ("M-C-S-p", tagSelect)                   -- Displays all tags</pre><p>In general you can customize the tools ad libitum. A good way to get started is to implement custom actions for the taskwarrior prompt. Please refer to <code><a href="TaskMonad.html#v:taskwarriorPrompt" title="TaskMonad">taskwarriorPrompt</a></code> for further information.  </p></div><a href="#g:2" id="g:2"><h1>Step 1: Capture</h1></a><div class="doc"><p>You can easily capture tasks, ideas or notes using the <code><a href="TaskMonad.html#v:taskwarriorPrompt" title="TaskMonad">taskwarriorPrompt</a></code> like this:</p><p>

    <a href="images/capture.png" data-lightbox="example-1">
      <img style="width:100%" src="images/capture.png" alt="Capture">
    </a>

</p></div><div class="top"><p class="src"><a id="v:taskwarriorPrompt" class="def">taskwarriorPrompt</a> <a href="src/TaskMonad.Prompt.html#taskwarriorPrompt" class="link">Source</a> <a href="#v:taskwarriorPrompt" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tbody><tr><td class="src">:: [(String -&gt; Bool, X ())]</td><td class="doc"><p>a list of tuples which contain a condition for an action as well as the action</p></td></tr><tr><td class="src">-&gt; X ()</td><td class="doc"><p>the resulting TaskWarrior prompt</p></td></tr></tbody></table></div><div class="doc"><p>A wrapper around <code><a href="TaskMonad-Prompt.html#v:customPrompt" title="TaskMonad.Prompt">customPrompt</a></code> that can be used to execute taskwarrior
 as well as custom commands.</p><p>You can specify a list of tuples which contain
 custom actions as well as conditions for the custom actions, like this:</p><pre>taskwarriorPrompt [(\x -&gt; x == "processInput", processInput)]</pre><p>However, if none of the specified actions is true, a default action will be executed.
 The default action shows taskwarrior reports in a scratchpad and executes all the other commands silently.  </p></div></div><a href="#g:3" id="g:3"><h1>Step 2 &amp; 3: Clarify &amp; Organize</h1></a><div class="doc"><p>You can clarify and organize your tasks using <code><a href="TaskMonad.html#v:processInbox" title="TaskMonad">processInbox</a></code>.
    It implements the typical Getting Things Done workflow using GridSelects:</p><p>
    <a href="images/workflow.png" data-lightbox="example-2">
      <img style="width:100%" src="images/workflow.png" alt="Workflow">
    </a>
</p></div><div class="top"><p class="src"><a id="v:processInbox" class="def">processInbox</a> :: X () <a href="src/TaskMonad.html#processInbox" class="link">Source</a> <a href="#v:processInbox" class="selflink">#</a></p><div class="doc"><p>Opens a set of gridselects used to process the inbox using the Getting Things Done workflow</p></div></div><a href="#g:4" id="g:4"><h1>Step 4: Reflect</h1></a><div class="doc"><p>You can implement your own custom daily- and weeklyreview routines.
 For example you can use <code><a href="TaskMonad.html#v:togglePriority" title="TaskMonad">togglePriority</a></code> to adjust the priority of tasks
    during the daily- / weeklyreview like this:</p><p>
<a href="images/taskmonad-gridselect.png" data-lightbox="example-3">
      <img style="width:100%" src="images/taskmonad-gridselect.png" alt="Workflow">
    </a>
</p></div><div class="top"><p class="src"><a id="v:togglePriority" class="def">togglePriority</a> <a href="src/TaskMonad.GridSelect.html#togglePriority" class="link">Source</a> <a href="#v:togglePriority" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tbody><tr><td class="src">:: String</td><td class="doc"><p>the priority that should be toggled</p></td></tr><tr><td class="src">-&gt; X ()</td><td class="doc"><p>the resulting gridselect</p></td></tr></tbody></table></div><div class="doc"><p>A wrapper around <code><a href="TaskMonad-GridSelect.html#v:togglePriorityWithConfig" title="TaskMonad.GridSelect">togglePriorityWithConfig</a></code> using the default GridSelect.Extras.GSConfig</p></div></div><a href="#g:5" id="g:5"><h1>Step 5: Engage</h1></a><div class="doc"><p>To decide which task to do next, you can use a collection of gridselects.
 You can use <code><a href="TaskMonad.html#v:tagSelect" title="TaskMonad">tagSelect</a></code>, <code><a href="TaskMonad.html#v:projectSelect" title="TaskMonad">projectSelect</a></code>, <code><a href="TaskMonad.html#v:dueSelect" title="TaskMonad">dueSelect</a></code> to display a gridselect
 to filter the tasks by tag, project or due date. However you can also display
    all pending tasks using <code><a href="TaskMonad.html#v:taskSelect" title="TaskMonad">taskSelect</a></code> like this:</p><p>
    <a href="images/engage.png" data-lightbox="example-4">
      <img style="width:100%" src="images/engage.png" alt="Workflow">
    </a>
</p></div><div class="top"><p class="src"><a id="v:taskSelect" class="def">taskSelect</a> <a href="src/TaskMonad.GridSelect.html#taskSelect" class="link">Source</a> <a href="#v:taskSelect" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tbody><tr><td class="src">:: String</td><td class="doc"><p>a filter to be applied, please refer to <a href="https://taskwarrior.org/docs/filter.html">TaskWarrior Filter</a> for further information</p></td></tr><tr><td class="src">-&gt; X ()</td><td class="doc"><p>the gridselect displaying all filtered tasks</p></td></tr></tbody></table></div><div class="doc"><p>A wrapper around <code><a href="TaskMonad-GridSelect.html#v:taskSelectWithConfig" title="TaskMonad.GridSelect">taskSelectWithConfig</a></code> using the default GSConfig</p></div></div><div class="top"><p class="src"><a id="v:dueSelect" class="def">dueSelect</a> :: X () <a href="src/TaskMonad.GridSelect.html#dueSelect" class="link">Source</a> <a href="#v:dueSelect" class="selflink">#</a></p><div class="doc"><p>A wrapper around <code><a href="TaskMonad-GridSelect.html#v:dueSelectWithConfig" title="TaskMonad.GridSelect">dueSelectWithConfig</a></code> using the default GSConfig</p></div></div><div class="top"><p class="src"><a id="v:tagSelect" class="def">tagSelect</a> :: X () <a href="src/TaskMonad.GridSelect.html#tagSelect" class="link">Source</a> <a href="#v:tagSelect" class="selflink">#</a></p><div class="doc"><p>A wrapper around <code><a href="TaskMonad-GridSelect.html#v:tagSelectWithConfig" title="TaskMonad.GridSelect">tagSelectWithConfig</a></code> using the default GSConfig</p></div></div><div class="top"><p class="src"><a id="v:projectSelect" class="def">projectSelect</a> :: X () <a href="src/TaskMonad.GridSelect.html#projectSelect" class="link">Source</a> <a href="#v:projectSelect" class="selflink">#</a></p><div class="doc"><p>A wrapper around <code><a href="TaskMonad-GridSelect.html#v:projectSelectWithConfig" title="TaskMonad.GridSelect">projectSelectWithConfig</a></code> using the default GSConfig</p></div></div><a href="#g:6" id="g:6"><h1>Scratchpad</h1></a><div class="doc"><p>The taskwarrior scratchpad is used to display taskwarrior reports that
 have been invoked using the taskwarrior prompt. However, you can use the
    scratchpad at your convenience. Just add a manage hook:</p><pre>... , manageHook = namedScratchpadManageHook taskwarriorScratchpads</pre><p>Afterwards you can bind a key to <code><a href="TaskMonad.html#v:taskwarriorScratchpad" title="TaskMonad">taskwarriorScratchpad</a></code>. The Scratchpad will look like this</p><p>
    <a href="images/taskmonad-scratchpad.png" data-lightbox="example-5">
      <img style="width:100%" src="images/taskmonad-scratchpad.png" alt="Workflow">
    </a>
</p></div><div class="top"><p class="src"><a id="v:taskwarriorScratchpads" class="def">taskwarriorScratchpads</a> :: [NamedScratchpad] <a href="src/TaskMonad.ScratchPad.html#taskwarriorScratchpads" class="link">Source</a> <a href="#v:taskwarriorScratchpads" class="selflink">#</a></p><div class="doc"><p>The TaskWarrior-Scratchpad which contains a tmux session</p></div></div><div class="top"><p class="src"><a id="v:taskwarriorScratchpad" class="def">taskwarriorScratchpad</a> :: X () <a href="src/TaskMonad.ScratchPad.html#taskwarriorScratchpad" class="link">Source</a> <a href="#v:taskwarriorScratchpad" class="selflink">#</a></p><div class="doc"><p>Open the TaskWarrior-ScratchPad</p></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>

    <script>
      $('#screencast').hover(function toggleControls() {
      if (this.hasAttribute("controls")) {
              this.removeAttribute("controls")
      } else {
              this.setAttribute("controls", "controls")
      }
      })
    </script>
    
  </body>
</html>