aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreniotna.t <eniotna.t@gmail.com>2014-06-17 19:42:46 +0200
committereniotna.t <eniotna.t@gmail.com>2014-06-17 19:42:46 +0200
commit7ac341ae36711084896a2b7f34ca42817ff41519 (patch)
tree7cd2799bdcf2b444f166fe2157da1c31e7130a03
parentf08d7673e8bc7f18e97952ff025a31c34e143e40 (diff)
downloadXMonadContrib-7ac341ae36711084896a2b7f34ca42817ff41519.tar.gz
XMonadContrib-7ac341ae36711084896a2b7f34ca42817ff41519.tar.xz
XMonadContrib-7ac341ae36711084896a2b7f34ca42817ff41519.zip
add-duck-duck-go-search-engine
Ignore-this: 29bbfb2d07d9ddf36bf0268a4e255f81 darcs-hash:20140617174246-ab0f9-f3d46d01ac21cf07b8128a622b44be1d6129b043.gz
-rw-r--r--XMonad/Actions/Search.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/XMonad/Actions/Search.hs b/XMonad/Actions/Search.hs
index ab55ba4..c03a061 100644
--- a/XMonad/Actions/Search.hs
+++ b/XMonad/Actions/Search.hs
@@ -51,6 +51,7 @@ module XMonad.Actions.Search ( -- * Usage
wikipedia,
wiktionary,
youtube,
+ duckduckgo,
multi,
-- * Use case: searching with a submap
-- $tip
@@ -138,6 +139,8 @@ import XMonad.Util.XSelection (getSelection)
* 'youtube' -- Youtube video search.
+* 'duckduckgo' -- DuckDuckGo search engine.
+
* 'multi' -- Search based on the prefix. \"amazon:Potter\" will use amazon, etc. With no prefix searches google.
Feel free to add more! -}
@@ -272,7 +275,7 @@ searchEngineF = SearchEngine
-- The engines.
amazon, alpha, codesearch, deb, debbts, debpts, dictionary, google, hackage, hoogle,
images, imdb, isohunt, lucky, maps, mathworld, openstreetmap, scholar, thesaurus, wayback, wikipedia, wiktionary,
- youtube :: SearchEngine
+ youtube, duckduckgo :: SearchEngine
amazon = searchEngine "amazon" "http://www.amazon.com/exec/obidos/external-search?index=all&keyword="
alpha = searchEngine "alpha" "http://www.wolframalpha.com/input/?i="
codesearch = searchEngine "codesearch" "http://www.google.com/codesearch?q="
@@ -296,9 +299,10 @@ wikipedia = searchEngine "wiki" "http://en.wikipedia.org/wiki/Speci
wiktionary = searchEngine "wikt" "http://en.wiktionary.org/wiki/Special:Search?go=Go&search="
youtube = searchEngine "youtube" "http://www.youtube.com/results?search_type=search_videos&search_query="
wayback = searchEngineF "wayback" ("http://web.archive.org/web/*/"++)
+duckduckgo = searchEngine "duckduckgo" "https://duckduckgo.com/?t=lm&q="
multi :: SearchEngine
-multi = namedEngine "multi" $ foldr1 (!>) [amazon, alpha, codesearch, deb, debbts, debpts, dictionary, google, hackage, hoogle, images, imdb, isohunt, lucky, maps, mathworld, openstreetmap, scholar, thesaurus, wayback, wikipedia, wiktionary, (prefixAware google)]
+multi = namedEngine "multi" $ foldr1 (!>) [amazon, alpha, codesearch, deb, debbts, debpts, dictionary, google, hackage, hoogle, images, imdb, isohunt, lucky, maps, mathworld, openstreetmap, scholar, thesaurus, wayback, wikipedia, wiktionary, duckduckgo, (prefixAware google)]
{- | This function wraps up a search engine and creates a new one, which works
like the argument, but goes directly to a URL if one is given rather than