diff options
author | c.lopez <c.lopez@kmels.net> | 2012-06-28 13:45:33 +0200 |
---|---|---|
committer | c.lopez <c.lopez@kmels.net> | 2012-06-28 13:45:33 +0200 |
commit | 91a8eb1a3043515cd6960815ab9aeb9fbed30b0d (patch) | |
tree | da4b501198abc279c66254da086f5780298f33e4 /XMonad | |
parent | 620555e3867be04572e1c41b1bc54fe23bfd7c51 (diff) | |
download | XMonadContrib-91a8eb1a3043515cd6960815ab9aeb9fbed30b0d.tar.gz XMonadContrib-91a8eb1a3043515cd6960815ab9aeb9fbed30b0d.tar.xz XMonadContrib-91a8eb1a3043515cd6960815ab9aeb9fbed30b0d.zip |
Removes warnings, adds a browser value for LauncherConfig in haddock comments
Ignore-this: 2610cf63594db3df61bac52f3d8f5836
darcs-hash:20120628114533-c3db2-3d33399a2794885da3282495d8fd64cfd6911af1.gz
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Actions/Launcher.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/XMonad/Actions/Launcher.hs b/XMonad/Actions/Launcher.hs index 4b54571..f2b76e1 100644 --- a/XMonad/Actions/Launcher.hs +++ b/XMonad/Actions/Launcher.hs @@ -50,7 +50,7 @@ import XMonad.Util.Run A LauncherConfig contains settings for the default modes, modify them accordingly. - > launcherConfig = LauncherConfig { pathToHoogle = "/home/YOU/.cabal/bin/hoogle" , actionsByExtension = extensionActions } + > launcherConfig = LauncherConfig { pathToHoogle = "/home/YOU/.cabal/bin/hoogle" , browser = "firefox" , actionsByExtension = extensionActions } @extensionActions :: M.Map String (String -> X()) extensionActions = M.fromList $ [ @@ -103,14 +103,14 @@ instance XPrompt HoogleMode where commandToComplete _ = id completionFunction (HMode pathToHoogleBin' _) = \s -> completionFunctionWith pathToHoogleBin' ["--count","5",s] -- This action calls hoogle again to find the URL corresponding to the autocompleted item - modeAction (HMode pathToHoogleBin'' browser) query result = do + modeAction (HMode pathToHoogleBin'' browser') query result = do completionsWithLink <- liftIO $ completionFunctionWith pathToHoogleBin'' ["--count","5","--link",query] let link = do s <- find (isJust . \c -> findSeqIndex c result) completionsWithLink i <- findSeqIndex s "http://" return $ drop i s case link of - Just l -> spawn $ browser ++ " " ++ l + Just l -> spawn $ browser' ++ " " ++ l _ -> return () where -- | Receives a sublist and a list. It returns the index where the sublist appears in the list. @@ -141,7 +141,7 @@ locateMode, locateRegexMode :: ExtensionActions -> XPMode locateMode actions = XPT $ LMode actions locateRegexMode actions = XPT $ LRMode actions hoogleMode :: FilePath -> String -> XPMode -hoogleMode pathToHoogleBin browser = XPT $ HMode pathToHoogleBin browser +hoogleMode pathToHoogleBin browser' = XPT $ HMode pathToHoogleBin browser' calcMode :: XPMode calcMode = XPT CalcMode |