From c12eb631523eb5acea75ebd4f21580f192e6ae78 Mon Sep 17 00:00:00 2001
From: Brent Yorgey <byorgey@gmail.com>
Date: Wed, 2 Apr 2008 17:05:21 +0200
Subject: Actions/Search.hs: add dictionary.com search

darcs-hash:20080402150521-bd4d7-fe7567e79447a04e3b049b0d77aa97c8a3567262.gz
---
 XMonad/Actions/Search.hs | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

(limited to 'XMonad')

diff --git a/XMonad/Actions/Search.hs b/XMonad/Actions/Search.hs
index 8e9387e..614444a 100644
--- a/XMonad/Actions/Search.hs
+++ b/XMonad/Actions/Search.hs
@@ -22,6 +22,7 @@ module XMonad.Actions.Search (    -- * Usage
                                selectSearchBrowser,
 
                                amazon,
+                               dictionary,
                                google,
                                hoogle,
                                imdb,
@@ -70,6 +71,8 @@ import XMonad.Util.XSelection (getSelection)
 
 * 'amazon' -- Amazon keyword search.
 
+* 'dictionary' -- dictionary.com search.
+
 * 'google' -- basic Google search.
 
 * 'hoogle' -- Hoogle, the Haskell libraries search engine.
@@ -182,15 +185,17 @@ simpleEngine :: Query -> SearchEngine
 simpleEngine site query = site ++ escape query
 
 -- The engines.
-amazon, google, hoogle, imdb, maps, mathworld, scholar, wayback, wikipedia :: SearchEngine
-amazon    = simpleEngine "http://www.amazon.com/exec/obidos/external-search?index=all&keyword="
-google    = simpleEngine "http://www.google.com/search?num=100&q="
-hoogle    = simpleEngine "http://www.haskell.org/hoogle/?q="
-imdb      = simpleEngine "http://www.imdb.com/Find?select=all&for="
-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="
+amazon, dictionary, google, hoogle, imdb, maps, mathworld,
+  scholar, wayback, wikipedia :: 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="
+hoogle     = simpleEngine "http://www.haskell.org/hoogle/?q="
+imdb       = simpleEngine "http://www.imdb.com/Find?select=all&for="
+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="
 {- 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. -}
@@ -214,7 +219,6 @@ promptSearch config engine = liftIO getBrowser >>= \ browser -> promptSearchBrow
 
 -- | Like 'search', but for use with the X selection; it grabs the selection,
 --   passes it to a given searchEngine and opens it in a given browser.
--- selectSearchBrowser :: Browser -> SearchEngine -> IO ()
 selectSearchBrowser :: Browser -> SearchEngine -> X ()
 selectSearchBrowser browser searchengine = search browser searchengine =<< getSelection
 
-- 
cgit v1.2.3