mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
add-duck-duck-go-search-engine
This commit is contained in:
parent
eca9d7318e
commit
1173c6c54f
@ -51,6 +51,7 @@ module XMonad.Actions.Search ( -- * Usage
|
|||||||
wikipedia,
|
wikipedia,
|
||||||
wiktionary,
|
wiktionary,
|
||||||
youtube,
|
youtube,
|
||||||
|
duckduckgo,
|
||||||
multi,
|
multi,
|
||||||
-- * Use case: searching with a submap
|
-- * Use case: searching with a submap
|
||||||
-- $tip
|
-- $tip
|
||||||
@ -138,6 +139,8 @@ import XMonad.Util.XSelection (getSelection)
|
|||||||
|
|
||||||
* 'youtube' -- Youtube video search.
|
* '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.
|
* 'multi' -- Search based on the prefix. \"amazon:Potter\" will use amazon, etc. With no prefix searches google.
|
||||||
|
|
||||||
Feel free to add more! -}
|
Feel free to add more! -}
|
||||||
@ -272,7 +275,7 @@ searchEngineF = SearchEngine
|
|||||||
-- The engines.
|
-- The engines.
|
||||||
amazon, alpha, codesearch, deb, debbts, debpts, dictionary, google, hackage, hoogle,
|
amazon, alpha, codesearch, deb, debbts, debpts, dictionary, google, hackage, hoogle,
|
||||||
images, imdb, isohunt, lucky, maps, mathworld, openstreetmap, scholar, thesaurus, wayback, wikipedia, wiktionary,
|
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="
|
amazon = searchEngine "amazon" "http://www.amazon.com/exec/obidos/external-search?index=all&keyword="
|
||||||
alpha = searchEngine "alpha" "http://www.wolframalpha.com/input/?i="
|
alpha = searchEngine "alpha" "http://www.wolframalpha.com/input/?i="
|
||||||
codesearch = searchEngine "codesearch" "http://www.google.com/codesearch?q="
|
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="
|
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="
|
youtube = searchEngine "youtube" "http://www.youtube.com/results?search_type=search_videos&search_query="
|
||||||
wayback = searchEngineF "wayback" ("http://web.archive.org/web/*/"++)
|
wayback = searchEngineF "wayback" ("http://web.archive.org/web/*/"++)
|
||||||
|
duckduckgo = searchEngine "duckduckgo" "https://duckduckgo.com/?t=lm&q="
|
||||||
|
|
||||||
multi :: SearchEngine
|
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
|
{- | 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
|
like the argument, but goes directly to a URL if one is given rather than
|
||||||
|
Loading…
x
Reference in New Issue
Block a user