aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhen.sydow <zhen.sydow@gmail.com>2008-05-13 23:25:08 +0200
committerzhen.sydow <zhen.sydow@gmail.com>2008-05-13 23:25:08 +0200
commit627242a2d040a3966f8c02591d0e0385be8acd91 (patch)
tree77d6d4847bb0c961134e22de851902e9e707a5a0
parent079ed1807ff1e41cc1eacbf4bf3e53b92f548c2d (diff)
downloadXMonadContrib-627242a2d040a3966f8c02591d0e0385be8acd91.tar.gz
XMonadContrib-627242a2d040a3966f8c02591d0e0385be8acd91.tar.xz
XMonadContrib-627242a2d040a3966f8c02591d0e0385be8acd91.zip
add youtube to search engines
darcs-hash:20080513212508-3cf16-7b4ce8ca8bbe1e9a3b9b3172974c38d9a2b80eb1.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 614444a..48e73b9 100644
--- a/XMonad/Actions/Search.hs
+++ b/XMonad/Actions/Search.hs
@@ -30,7 +30,8 @@ module XMonad.Actions.Search ( -- * Usage
mathworld,
scholar,
wayback,
- wikipedia
+ wikipedia,
+ youtube
-- * Use case: searching with a submap
-- $tip
@@ -89,6 +90,8 @@ import XMonad.Util.XSelection (getSelection)
* 'wikipedia' -- basic Wikipedia search.
+* 'youtube' -- Youtube video search.
+
Feel free to add more! -}
{- $tip
@@ -186,7 +189,7 @@ simpleEngine site query = site ++ escape query
-- The engines.
amazon, dictionary, google, hoogle, imdb, maps, mathworld,
- scholar, wayback, wikipedia :: SearchEngine
+ scholar, wayback, wikipedia, youtube :: SearchEngine
amazon = simpleEngine "http://www.amazon.com/exec/obidos/external-search?index=all&keyword="
dictionary = simpleEngine "http://dictionary.reference.com/browse/"
google = simpleEngine "http://www.google.com/search?num=100&q="
@@ -196,6 +199,7 @@ maps = simpleEngine "http://maps.google.com/maps?q="
mathworld = simpleEngine "http://mathworld.wolfram.com/search/?query="
scholar = simpleEngine "http://scholar.google.com/scholar?q="
wikipedia = simpleEngine "https://secure.wikimedia.org/wikipedia/en/wiki/Special:Search?go=Go&search="
+youtube = simpleEngine "http://www.youtube.com/results?search_type=search_videos&search_query="
{- This doesn't seem to work, but nevertheless, it seems to be the official
method at <http://web.archive.org/collections/web/advanced.html> to get the
latest backup. -}