aboutsummaryrefslogtreecommitdiffstats
path: root/XMonadPrompt.hs
blob: 6b21e117e05e484ae72023fe1585fae9aba7b5af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
-----------------------------------------------------------------------------
-- |
-- Module      :  XMonadContrib.XMonadPrompt
-- Copyright   :  (C) 2007 Andrea Rossato
-- License     :  BSD3
-- 
-- Maintainer  :  andrea.rossato@unibz.it
-- Stability   :  unstable
-- Portability :  unportable
--
-- A prompt for running XMonad commands
--
-----------------------------------------------------------------------------

module XMonadContrib.XMonadPrompt (
                             -- * Usage
                             -- $usage
                             xmonadPrompt
                              ) where
{-
usage:
in Config.hs add:
> import XMonadContrib.XPrompt
> import XMonadContrib.XMonadPrompt

in you keybindings add:

>   , ((modMask .|. controlMask, xK_x), xmonadPrompt defaultPromptConfig)

-}

import XMonad
import XMonadContrib.XPrompt
import XMonadContrib.Commands

data XMonad = XMonad

instance XPrompt XMonad where
    showXPrompt XMonad = "XMonad:   "

xmonadPrompt :: XPConfig -> X ()
xmonadPrompt c = mkXPrompt XMonad c (mkComplFunFromList (map fst defaultCommands)) runCommand'