XMonad.Actions.Launcher

xmonad-contrib-0.18.1: Community-maintained extensions for xmonad

Copyright | (C) 2012 Carlos López-Camey
License | None; public domain
Maintainer | <c.lopez@kmels.net>
Stability | unstable
Safe Haskell | None
Language | Haskell2010

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(def)
    import XMonad.Actions.Launcher

    ((modm .|. controlMask, xK_l), launcherPrompt def $ 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 the default `XPConfig`, 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