From eaccda4a23dfe6d23421a2c85db80261500dbaa6 Mon Sep 17 00:00:00 2001 From: gwern0 Date: Sun, 16 Mar 2008 22:39:14 +0100 Subject: Search.hs: haddock fmt This removes whitespace in source code snippets. Because Haddock renders quoted source code as monospaced unwrappable text, the excess whitespace meant you would have to scroll horizontally, unpleasantly. darcs-hash:20080316213914-f7719-9e03305d976a466e956b9e49181ac816a257b84c.gz --- XMonad/Actions/Search.hs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'XMonad/Actions/Search.hs') diff --git a/XMonad/Actions/Search.hs b/XMonad/Actions/Search.hs index 9b8eb3a..4ea568a 100644 --- a/XMonad/Actions/Search.hs +++ b/XMonad/Actions/Search.hs @@ -8,8 +8,7 @@ Portability : unportable A module for easily running Internet searches on web sites through xmonad. - Modeled after the handy Surfraw CLI search tools at - . + Modeled after the handy Surfraw CLI search tools at . Additional sites welcomed. -} @@ -98,17 +97,18 @@ First import the necessary modules: 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) +> ... +> -- 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) -> ] +> 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 @@ -194,7 +194,7 @@ wayback = simpleEngine "http://web.archive.org/" {- | Like 'search', but in this case, the string is not specified but grabbed from the user's response to a prompt. Example: - > , ((modm, xK_g ), promptSearch greenXPConfig "firefox" google) + > , ((modm, xK_g), promptSearch greenXPConfig "firefox" google) -} promptSearch :: XPConfig -> Browser -> SearchEngine -> X () @@ -203,7 +203,7 @@ promptSearch config browser site = mkXPrompt Search config (getShellCompl []) $ {- | Like 'search', but for use with the X selection; it grabs the selection, passes it to a given searchEngine and opens it in the given browser. Example: -> , ((modm .|. shiftMask, xK_g ), selectSearch "firefox" google) +> , ((modm .|. shiftMask, xK_g), selectSearch "firefox" google) -} selectSearch :: MonadIO m => Browser -> SearchEngine -> m () -- cgit v1.2.3