xmonad-contrib-0.11.1: Third party extensions for xmonad

Stability | unstable
Maintainer | <c.lopez@kmels.net>
Safe Haskell | None

XMonad.Actions.Launcher

Contents

- Description and use

Description

A set of prompts for XMonad

Synopsis

- defaultLauncherModes :: LauncherConfig -> [XPMode]
- type ExtensionActions = Map String (String -> X ())
- data LauncherConfig = LauncherConfig {
  - browser :: String
  - pathToHoogle :: String
  }
- launcherPrompt :: XPConfig -> [XPMode] -> X ()

# Description and use

This module exemplifies usage of `mkXPromptWithModes`. It includes two modes:

- Hoogle mode: Search for functions using hoogle, choosing a function leads you to documentation in Haddock.
- Calc: Uses the program calc to do calculations.

To test it, modify your local .xmonad:

     import XMonad.Prompt(defaultXPConfig)
     import XMonad.Actions.Launcher

     ((modm .|. controlMask, xK_l), launcherPrompt defaultXPConfig $ defaultLauncherModes launcherConfig)

A LauncherConfig contains settings for the default modes, modify them accordingly.

     launcherConfig = LauncherConfig { pathToHoogle = "/home/YOU/.cabal/bin/hoogle" , browser = "firefox"}

Restart xmonad. Press Ctrl + Your_Modkey + L and the first prompt should pop up.

If you used `defaultXPConfig`, you can change mode with `xK_grave`. If you are using your own `XPConfig`, define the value for `changeModeKey`.

defaultLauncherModes :: LauncherConfig -> [XPMode]

Create a list of modes based on : a list of extensions mapped to actions the path to hoogle

type ExtensionActions = Map String (String -> X ())

data LauncherConfig

Constructors

LauncherConfig |

Fields

browser :: String
pathToHoogle :: String

launcherPrompt :: XPConfig -> [XPMode] -> X ()

Creates a prompt with the given modes