aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Actions/Search.hs
diff options
context:
space:
mode:
authorBrent Yorgey <byorgey@gmail.com>2008-01-31 17:19:48 +0100
committerBrent Yorgey <byorgey@gmail.com>2008-01-31 17:19:48 +0100
commit1fb7bc5eeeb14107abc57e50b33096f4758f5909 (patch)
tree5ea2c7e73eb58f4b844a22237bd93339021f967c /XMonad/Actions/Search.hs
parent24dc09aa48e7b2a569aa8c0201c485cfec04ef55 (diff)
downloadXMonadContrib-1fb7bc5eeeb14107abc57e50b33096f4758f5909.tar.gz
XMonadContrib-1fb7bc5eeeb14107abc57e50b33096f4758f5909.tar.xz
XMonadContrib-1fb7bc5eeeb14107abc57e50b33096f4758f5909.zip
Search.hs: haddock cleanup
darcs-hash:20080131161948-bd4d7-2b3b51f5698ee4755402db7984406fa3c585fe76.gz
Diffstat (limited to 'XMonad/Actions/Search.hs')
-rw-r--r--XMonad/Actions/Search.hs67
1 files changed, 32 insertions, 35 deletions
diff --git a/XMonad/Actions/Search.hs b/XMonad/Actions/Search.hs
index caae13c..9b8eb3a 100644
--- a/XMonad/Actions/Search.hs
+++ b/XMonad/Actions/Search.hs
@@ -8,13 +8,13 @@
Portability : unportable
A module for easily running Internet searches on web sites through xmonad.
- Modeled after the handy Surfraw CLI search tools
+ Modeled after the handy Surfraw CLI search tools at
<https://secure.wikimedia.org/wikipedia/en/wiki/Surfraw>.
Additional sites welcomed.
-}
module XMonad.Actions.Search ( -- * Usage
- -- $usage
+ -- $usage
search,
simpleEngine,
promptSearch,
@@ -28,7 +28,8 @@ module XMonad.Actions.Search ( -- * Usage
scholar,
wayback,
wikipedia
- -- * Tip
+
+ -- * Use case: searching with a submap
-- $tip
) where
@@ -86,44 +87,40 @@ Feel free to add more!
{- $tip
-In combination with "XMonad.Actions.Submap" you can create a powerfull
-and easy way to search without adding a whole bunch of bindings:
+In combination with "XMonad.Actions.Submap" you can create a powerful
+and easy way to search without adding a whole bunch of bindings.
First import the necessary modules:
-@
-import qualified XMonad.Prompt as P
-import qualified XMonad.Actions.Submap as SM
-import qualified XMonad.Actions.Search as S
-@
+> import qualified XMonad.Prompt as P
+> import qualified XMonad.Actions.Submap as SM
+> import qualified XMonad.Actions.Search as S
Then add the following to your key bindings:
-@
- -- Search commands
- , ((modm, xK_s), SM.submap $ searchEngineMap $ S.promptSearch P.defaultXPConfig)
- , ((modm .|. shiftMask, xK_s), SM.submap $ searchEngineMap $ S.selectSearch)
-@
-
-where:
-
-@
- searchEngineMap method = M.fromList $
- [ ((0, xK_g), method \"firefox\" S.google)
- , ((0, xK_h), method \"firefox\" S.hoogle)
- , ((0, xK_w), method \"firefox\" S.wikipedia)
- ]
-@
-
-Make sure to set firefox to open new pages in a new window instead of in a new tab:
-Firefox -> Edit -> Preferences -> Tabs -> New pages should be opened in...
-
-Now /modm-s g/ \/ /h/ \/ /w/ prompts you for a search string, then opens a new
-firefox window that performs the search on Google, Hoogle or
-Wikipedia respectively.
-
-If you select something in whatever application and hit /modm-shift-s g/ \/ /h/ \/ /w/
-it will search the selected string with the specified engine.
+> -- Search commands
+> , ((modm, xK_s), SM.submap $ searchEngineMap $ S.promptSearch P.defaultXPConfig)
+> , ((modm .|. shiftMask, xK_s), SM.submap $ searchEngineMap $ S.selectSearch)
+>
+> ...
+>
+> searchEngineMap method = M.fromList $
+> [ ((0, xK_g), method \"firefox\" S.google)
+> , ((0, xK_h), method \"firefox\" S.hoogle)
+> , ((0, xK_w), method \"firefox\" S.wikipedia)
+> ]
+
+Make sure to set firefox to open new pages in a new window instead of
+in a new tab: @Firefox -> Edit -> Preferences -> Tabs -> New pages
+should be opened in...@
+
+Now /mod-s/ + /g/\//h/\//w/ prompts you for a search string, then
+opens a new firefox window that performs the search on Google, Hoogle
+or Wikipedia respectively.
+
+If you select something in whatever application and hit /mod-shift-s/ +
+/g/\//h/\//w/ it will search the selected string with the specified
+engine.
Happy searching!
-}