mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 12:41:52 -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`
|
* `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`
|
* `XMonad.Layout.BoringWindows`
|
||||||
|
|
||||||
Added 'markBoringEverywhere' function, to mark the currently
|
Added 'markBoringEverywhere' function, to mark the currently
|
||||||
|
@@ -18,6 +18,7 @@ module XMonad.Actions.Search ( -- * Usage
|
|||||||
searchEngineF,
|
searchEngineF,
|
||||||
promptSearch,
|
promptSearch,
|
||||||
promptSearchBrowser,
|
promptSearchBrowser,
|
||||||
|
promptSearchBrowser',
|
||||||
selectSearch,
|
selectSearch,
|
||||||
selectSearchBrowser,
|
selectSearchBrowser,
|
||||||
isPrefixOf,
|
isPrefixOf,
|
||||||
@@ -361,6 +362,18 @@ promptSearchBrowser :: XPConfig -> Browser -> SearchEngine -> X ()
|
|||||||
promptSearchBrowser config browser (SearchEngine name site) =
|
promptSearchBrowser config browser (SearchEngine name site) =
|
||||||
mkXPrompt (Search name) config (historyCompletionP ("Search [" `isPrefixOf`)) $ search browser 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
|
{- | Like 'search', but in this case, the string is not specified but grabbed
|
||||||
from the user's response to a prompt. Example:
|
from the user's response to a prompt. Example:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user