TaskMonad-1.0.0: A collection of tools which can be used to access taskwarrior from xmonad.

CopyrightClemens Fruhwirth <clemens@endorphin.org> Max Magorsch <max@magorsch.de>
LicenseBSD-style (see LICENSE)
MaintainerMax Magorsch <max@magorsch.de>
Safe HaskellNone




GridSelect.Extras adds a method to XMonad.Actions.GridSelect that displays a message at the top of the screen while using the normal GridSelect.



You can use this module with the following in your ~/.xmonad/xmonad.hs:

   import qualified GridSelect.Extras

Then add a keybinding, e.g.

   , ((modm, xK_g), gridselect gsconfig message actions)
           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'") ]

This module also supports displaying an icon in the message window. To do so, just use runSelectedActionWithMessageAndIcon like so:

   , ((modm, xK_g), gridselect gsconfig message icon actions)
            gridselect = GridSelect.Extras.runSelectedActionWithMessageAndIcon
            icon       = [[True,  False, False],
                          [False, True,  False],
                          [True,  False, True ]]
            -- ...  

runSelectedActionWithMessageAndIcon :: GSConfig (X ()) -> String -> [[Bool]] -> [(String, X ())] -> X () Source #

Select an action and run it in the X monad. Furthermore display a message on top of the screen.


Selecting an action:


It is possible to customize GridSelect.Extras the same way GridSelect is customized. Please refer to the GridSelect Documentation for further information.


data GSConfig a Source #

The Default instance gives a basic configuration for gridselect, with the colorizer chosen based on the type.

If you want to replace the gs_colorizer field, use buildDefaultGSConfig instead of def to avoid ambiguous type variables.

HasColorizer a => Default (GSConfig a) Source # 
Instance details

Defined in GridSelect.Extras


def :: GSConfig a #

def :: Default a => a #

The default value for this type.

buildDefaultGSConfig :: (a -> Bool -> X (String, String)) -> GSConfig a Source #

Builds a default gs config from a colorizer function.

defaultNavigation :: TwoD a (Maybe a) Source #

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 defaultNavigation as gs_navigate to your GSConfig object. This is done by buildDefaultGSConfig automatically.