diff options
author | nicolas.pouillard <nicolas.pouillard@gmail.com> | 2008-01-09 22:39:16 +0100 |
---|---|---|
committer | nicolas.pouillard <nicolas.pouillard@gmail.com> | 2008-01-09 22:39:16 +0100 |
commit | 9b71bcbc56caa60de56d9b31975b10eb2f55555c (patch) | |
tree | fbfe5d5a6c4f0a94b855b7401f34afbe63fe4c6d | |
parent | 3922b63c007f300a7e71a4599a1af1f8efee3b98 (diff) | |
download | XMonadContrib-9b71bcbc56caa60de56d9b31975b10eb2f55555c.tar.gz XMonadContrib-9b71bcbc56caa60de56d9b31975b10eb2f55555c.tar.xz XMonadContrib-9b71bcbc56caa60de56d9b31975b10eb2f55555c.zip |
prompt: Allow to provide a default text in the prompt config.
darcs-hash:20080109213916-94725-806649257a0bc1b5d7b9ac423d82e03cd240cddb.gz
-rw-r--r-- | XMonad/Prompt.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/XMonad/Prompt.hs b/XMonad/Prompt.hs index 3459db7..0c83637 100644 --- a/XMonad/Prompt.hs +++ b/XMonad/Prompt.hs @@ -96,6 +96,7 @@ data XPConfig = , position :: XPPosition -- ^ Position: 'Top' or 'Bottom' , height :: Dimension -- ^ Window height , historySize :: Int -- ^ The number of history entries to be saved + , defaultText :: String -- ^ The text by default in the prompt line } deriving (Show, Read) data XPType = forall p . XPrompt p => XPT p @@ -135,6 +136,7 @@ defaultXPConfig = , position = Bottom , height = 18 , historySize = 256 + , defaultText = [] } type ComplFunction = String -> IO [String] @@ -142,7 +144,7 @@ type ComplFunction = String -> IO [String] initState :: XPrompt p => Display -> Window -> Window -> Rectangle -> ComplFunction -> GC -> XMonadFont -> p -> [History] -> XPConfig -> XPState initState d rw w s compl gc fonts pt h c = - XPS d rw w s Nothing Nothing compl gc fonts (XPT pt) "" 0 h c + XPS d rw w s Nothing Nothing compl gc fonts (XPT pt) (defaultText c) 0 h c -- | Same as 'mkXPrompt', except that the action function can have -- type @String -> X a@, for any @a@, and the final action returned |