diff options
author | Brent Yorgey <byorgey@gmail.com> | 2007-12-14 17:31:19 +0100 |
---|---|---|
committer | Brent Yorgey <byorgey@gmail.com> | 2007-12-14 17:31:19 +0100 |
commit | 8a9ee37469d02d9f7a78c7cdf5dcc84cfd727cd8 (patch) | |
tree | c80195f133a1189ff456a8ba1a4556d09d42e585 /XMonad/Util | |
parent | 15e1840a96a2f5daa8f88af026e1bbfbbfdb2a0a (diff) | |
download | XMonadContrib-8a9ee37469d02d9f7a78c7cdf5dcc84cfd727cd8.tar.gz XMonadContrib-8a9ee37469d02d9f7a78c7cdf5dcc84cfd727cd8.tar.xz XMonadContrib-8a9ee37469d02d9f7a78c7cdf5dcc84cfd727cd8.zip |
Search.hs: fix shadowing warning and haddock errors
darcs-hash:20071214163119-bd4d7-1307134ac9e109a8912985e25c060474c1722a52.gz
Diffstat (limited to '')
-rw-r--r-- | XMonad/Util/Search.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/XMonad/Util/Search.hs b/XMonad/Util/Search.hs index ec627ab..17b7e8c 100644 --- a/XMonad/Util/Search.hs +++ b/XMonad/Util/Search.hs @@ -48,7 +48,7 @@ escape = escapeURIString (\c -> isAlpha c || isDigit c || isMark c) -- | Given the base search URL, a browser to use, and the actual query, escape -- the query, prepend the base URL, and hand it off to the browser. search :: String -> FilePath -> String -> IO () -search site browser search = safeSpawn browser $ site ++ escape search +search site browser query = safeSpawn browser $ site ++ escape query promptSearch :: (String -> String -> IO ()) -> String -> XPConfig -> X () promptSearch engine browser config = mkXPrompt Search config (getShellCompl []) $ io . (engine browser) @@ -63,14 +63,16 @@ wikipediaSearch = search "https://secure.wikimedia.org/wikipedia/en/wiki/Special waybackSearch = search "http://web.archive.org/" -- | Search the particular site; these are suitable for binding to a key. Use them like this: +-- -- > , ((modm, xK_g ), google "firefox" defaultXPConfig) +-- -- First argument is the browser you want to use, the second the prompt configuration google, wayback, wikipedia :: String -> XPConfig -> X () google = promptSearch googleSearch wikipedia = promptSearch wikipediaSearch wayback = promptSearch waybackSearch --- | See previous. Like google/wikipedia, but one less argument - the query is +-- | See previous. Like google\/wikipedia, but one less argument - the query is -- extracted from the copy-paste buffer of X Windows. googleSelection, waybackSelection, wikipediaSelection :: String -> X () googleSelection browser = io $ googleSearch browser =<< getSelection |