aboutsummaryrefslogtreecommitdiffstats
path: root/ShellPrompt.hs
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@unibz.it>2007-10-26 23:19:56 +0200
committerAndrea Rossato <andrea.rossato@unibz.it>2007-10-26 23:19:56 +0200
commit9a2f7c61cd95f0a854383499a1d55ac2d770557f (patch)
treedc835632bb76eb7abb639f0721f4e8bf98b3435a /ShellPrompt.hs
parent7374d223cc41453b2b13f01e7be1d01d4a536969 (diff)
downloadXMonadContrib-9a2f7c61cd95f0a854383499a1d55ac2d770557f.tar.gz
XMonadContrib-9a2f7c61cd95f0a854383499a1d55ac2d770557f.tar.xz
XMonadContrib-9a2f7c61cd95f0a854383499a1d55ac2d770557f.zip
ShellPrompt: reformat the comments to complay with the module style
darcs-hash:20071026211956-32816-5c19f3ab7211bdd70702beb90a691b110684cb7b.gz
Diffstat (limited to '')
-rw-r--r--ShellPrompt.hs22
1 files changed, 14 insertions, 8 deletions
diff --git a/ShellPrompt.hs b/ShellPrompt.hs
index 0692244..406916c 100644
--- a/ShellPrompt.hs
+++ b/ShellPrompt.hs
@@ -57,14 +57,20 @@ shellPrompt c = do
cmds <- io $ getCommands
mkXPrompt Shell c (getShellCompl cmds) spawn
-{- | See safe and unsafeSpawn. prompt is an alias for safePrompt; safePrompt and unsafePrompt work on the same principles,
- but will use XPrompt to interactively query the user for input; the appearance is set by passing an XPConfig as the
- second argument. The first argument is the program to be run with the interactive input.
- You would use these like this:
- > , ((modMask, xK_b ), safePrompt "firefox" greenXPConfig)
- > , ((modMask .|. shiftMask, xK_c ), prompt ("xterm" ++ " -e") greenXPConfig)
- Note that you want to use safePrompt for Firefox input, as Firefox wants URLs, and unsafePrompt for the XTerm example
- because this allows you to easily start a terminal executing an arbitrary command, like 'top'. -}
+-- | See safe and unsafeSpawn. prompt is an alias for safePrompt;
+-- safePrompt and unsafePrompt work on the same principles, but will use
+-- XPrompt to interactively query the user for input; the appearance is
+-- set by passing an XPConfig as the second argument. The first argument
+-- is the program to be run with the interactive input.
+-- You would use these like this:
+--
+-- > , ((modMask, xK_b ), safePrompt "firefox" greenXPConfig)
+-- > , ((modMask .|. shiftMask, xK_c ), prompt ("xterm" ++ " -e") greenXPConfig)
+--
+-- Note that you want to use safePrompt for Firefox input, as Firefox
+-- wants URLs, and unsafePrompt for the XTerm example because this allows
+-- you to easily start a terminal executing an arbitrary command, like
+-- 'top'.
prompt, unsafePrompt, safePrompt :: FilePath -> XPConfig -> X ()
prompt = unsafePrompt
safePrompt c config = mkXPrompt Shell config (getShellCompl [c]) run