mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-31 20:21:51 -07:00
Merge pull request #330 from slotThe/master
X.A.Search: Add promptSearchBrowser'
This commit is contained in:
@@ -51,8 +51,10 @@
|
||||
|
||||
* `XMonad.Actions.Search`
|
||||
|
||||
The `hoogle` function now uses the new URL `hoogle.haskell.org`.
|
||||
|
||||
- The `hoogle` function now uses the new URL `hoogle.haskell.org`.
|
||||
- Added `promptSearchBrowser'` function to only suggest previous searches of
|
||||
the selected search engine (instead of all search engines).
|
||||
|
||||
* `XMonad.Layout.BoringWindows`
|
||||
|
||||
Added 'markBoringEverywhere' function, to mark the currently
|
||||
|
@@ -18,6 +18,7 @@ module XMonad.Actions.Search ( -- * Usage
|
||||
searchEngineF,
|
||||
promptSearch,
|
||||
promptSearchBrowser,
|
||||
promptSearchBrowser',
|
||||
selectSearch,
|
||||
selectSearchBrowser,
|
||||
isPrefixOf,
|
||||
@@ -361,6 +362,18 @@ promptSearchBrowser :: XPConfig -> Browser -> SearchEngine -> X ()
|
||||
promptSearchBrowser config browser (SearchEngine name site) =
|
||||
mkXPrompt (Search name) config (historyCompletionP ("Search [" `isPrefixOf`)) $ search browser site
|
||||
|
||||
{- | Like 'promptSearchBrowser', but only suggest previous searches for the
|
||||
given 'SearchEngine' in the prompt. -}
|
||||
promptSearchBrowser' :: XPConfig -> Browser -> SearchEngine -> X ()
|
||||
promptSearchBrowser' config browser (SearchEngine name site) =
|
||||
mkXPrompt
|
||||
(Search name)
|
||||
config
|
||||
(historyCompletionP (searchName `isPrefixOf`))
|
||||
$ search browser site
|
||||
where
|
||||
searchName = showXPrompt (Search name)
|
||||
|
||||
{- | Like 'search', but in this case, the string is not specified but grabbed
|
||||
from the user's response to a prompt. Example:
|
||||
|
||||
|
Reference in New Issue
Block a user