aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@unibz.it>2008-02-16 14:38:42 +0100
committerAndrea Rossato <andrea.rossato@unibz.it>2008-02-16 14:38:42 +0100
commit31ae98bcc9158787eb264a0bc84b25dc10351928 (patch)
tree912c1bfd875cc4c3f77049c8eac63a45ba186d82 /XMonad
parent79d598db5c32f84a0d12131d0f24f99edcb0f5ce (diff)
downloadXMonadContrib-31ae98bcc9158787eb264a0bc84b25dc10351928.tar.gz
XMonadContrib-31ae98bcc9158787eb264a0bc84b25dc10351928.tar.xz
XMonadContrib-31ae98bcc9158787eb264a0bc84b25dc10351928.zip
Prompt.Window: remove unneeded and ugly escaping/unescaping
darcs-hash:20080216133842-32816-e47eca7967f6fd2134473fc9114113d744a0a57a.gz
Diffstat (limited to '')
-rw-r--r--XMonad/Prompt/Window.hs18
1 files changed, 6 insertions, 12 deletions
diff --git a/XMonad/Prompt/Window.hs b/XMonad/Prompt/Window.hs
index b4f6656..cf34fdd 100644
--- a/XMonad/Prompt/Window.hs
+++ b/XMonad/Prompt/Window.hs
@@ -50,8 +50,10 @@ import XMonad.Actions.WindowBringer
data WindowPrompt = Goto | Bring
instance XPrompt WindowPrompt where
- showXPrompt Goto = "Go to window: "
- showXPrompt Bring = "Bring me here: "
+ showXPrompt Goto = "Go to window: "
+ showXPrompt Bring = "Bring me here: "
+ commandToComplete _ c = c
+ nextCompletion _ = getNextCompletion
windowPromptGoto, windowPromptBring :: XPConfig -> X ()
windowPromptGoto c = doPrompt Goto c
@@ -69,17 +71,9 @@ doPrompt t c = do
where
- winAction a m = flip whenJust (windows . a) . flip M.lookup m . unescape
+ winAction a m = flip whenJust (windows . a) . flip M.lookup m
gotoAction = winAction W.greedyView
bringAction = winAction bringWindow
bringWindow w ws = W.shiftWin (W.tag . W.workspace . W.current $ ws) w ws
- compList m s = return . filter (isPrefixOf s) . map (escape . fst) . M.toList $ m
-
- escape [] = []
- escape (' ':xs) = "\\ " ++ escape xs
- escape (x :xs) = x : escape xs
-
- unescape [] = []
- unescape ('\\':' ':xs) = ' ' : unescape xs
- unescape (x:xs) = x : unescape xs
+ compList m s = return . filter (isPrefixOf s) . map fst . M.toList $ m