Commit Graph

62 Commits

Author SHA1 Message Date
slotThe
8e0e8a605d X.A.Search: Make (!>) right associative
Unless specified otherwise, operators in Haskell associative to the
left.  However, the ergonomics of (!>) heavily lean towards the left
operand being a "single" search engine, not a combined one.

This causes trouble when not using `multi` or defining search engines
with a right fold, but (following the documentation) writing something
like

    multiEngine = intelligent (wikipedia !> mathworld !> (prefixAware google))

instead.  This particular definition would force the user to write
`wikipedia/mathworld:wikipedia:search-term` instead of just
`wikipedia:search-term` to access the first search engine.

Simply giving (!>) an explicit associativity fixes these problems.
2021-10-19 18:48:47 +02:00
alternateved
374293c179 Fix missing export 2021-10-13 19:23:40 +02:00
slotThe
38c11c1e3c Add "Description" field to module headers
Fixes: https://github.com/xmonad/xmonad-contrib/issues/592
2021-09-26 14:15:54 +02:00
slotThe
7f49fe3b4d X.A.Search: Change http to https
It really is time.
2021-09-23 12:16:29 +02:00
alternateved
732a3b6e75 X.A.Search: Update/Remove outdated URLs, add GitHub
- The `codesearch`, `openstreetmap`, and `thesaurus` searches were
    using old URLs; update those.
  - Remove the now defunct isoHunt serach.
  - Add a search for GitHub.
2021-09-23 12:16:29 +02:00
slotThe
bd5b969d9b Apply hlint hints
All hints are applied in one single commit, as a commit per hint would
result in 80+ separate commits—tihs is really just too much noise.

Related: https://github.com/xmonad/xmonad-contrib/issues/537
2021-06-06 18:59:05 +02:00
slotThe
2469269119 New module: XMonad.Prelude
This is a convenience module in order to have less import noise.  It
re-exports the following:

  a) Commonly used modules in full (Data.Foldable, Data.Applicative, and
     so on); though only those that play nicely with each other, so that
     XMonad.Prelude can be imported unqualified without any problems.
     This prevents things like `Prelude.(.)` and `Control.Category.(.)`
     fighting with each other.

  b) Helper functions that don't necessarily fit in any other module;
     e.g., the often used abbreviation `fi = fromIntegral`.
2021-05-13 17:44:47 +02:00
slotThe
9d520dc880 X.Prompt: X constraint for historyCompletion[P]
This is needed because the cache directory is now a part of XConf, which
is calculated once on startup and hence any recalculation would be
fragile.

Some internal functions that are not exposed (like writeHistory) were
also changed to accept that directory as an argument.
2021-01-07 10:33:47 +01:00
Dave
faf89612aa Update Search.hs
Add ebay function
2020-06-01 12:00:04 -04:00
slotThe
5493ff190d Add promptSearchBrowser' to further filter suggestions
Users may suggesting previous searches if and only if they came from the same
search engine more natural.
2020-01-19 22:08:48 +01:00
Brent Yorgey
6040fe6c8f Merge pull request #318 from slotThe/master
X.A.Search: Update hoogle URL
2019-10-05 08:05:44 -05:00
slotThe
48e6bb5529 X.A.Search: Update hoogle URL 2019-10-05 10:30:50 +02:00
Evgeny Budilovsky
3c7d58b836 XMonad/Actions/Search: fix spelling mistake 2019-10-05 09:11:38 +03:00
Brent Yorgey
81f1eab1ee X.A.Search: fix amazon search URL
Closes #71.
2016-08-01 13:01:30 -05:00
Brent Yorgey
e521d6546f X.A.Search: fix missing type sig warning 2015-12-10 21:07:24 -06:00
Sibi Prabakaran
9eb55c76ea Add Stackage and Vocabulary as new search engines. 2015-11-22 15:10:14 +05:30
Adam Vogt
7dac12829d remove unused imports 2014-08-15 05:12:34 +00:00
eniotna.t
1173c6c54f add-duck-duck-go-search-engine 2014-06-17 17:42:46 +00:00
Daniel Wagner
0f1b6fb772 use Data.Default wherever possible, and deprecate the things it replaces 2013-05-28 01:39:09 +00:00
Adam Vogt
067ccb950e Export types to reduce haddock warnings. 2010-10-23 19:57:55 +00:00
Mats Rauhala
8056bb5c2c Action search autocomplete based on whole line
The previous version autocompleted based on words, but when searching from web
sites, it makes more sense to autocomplete based on the entire search.
2011-05-04 21:52:01 +00:00
Khudyakov Alexey
e708caf2ac encode string of bytes not list of chars 2010-06-13 11:33:41 +00:00
Adam Vogt
d310cf5f69 A.Search: Remove unnecessary `do' 2010-04-29 13:47:49 +00:00
Khudyakov Alexey
f7d8eb3fdd Fix escaping of URI 2010-04-23 20:47:07 +00:00
Jurgen Doser
208d920b6b fixed argument order to isPrefixOf in a couple of places in X.A.Search
In some places, ((!>), prefixAware, and one place in the documentation),
isPrefixOf was used with wrong argument order.  In particular, this made
combining search engines not work as advertised, for example, the predefined
search engine "multi".
2010-03-16 12:20:10 +00:00
intrigeri
d32efe75e4 Actions/Search: added openstreetmap 2009-12-22 11:45:45 +00:00
gwern0
8fa0319e89 XMonad.Actions.Search: finally fixed the internet archive search plugin 2009-12-05 03:34:35 +00:00
gwern0
8e8962909b XMonad.Actions.Search: in retrospect, a bit silly to make everyone go through SSL 2009-12-05 03:33:18 +00:00
gwern0
2edac2fc13 XMonad.Actions.Search: imdb search URL tweak for bug #33 2009-11-03 22:23:30 +00:00
Daniel Schoepe
02eed22659 Only use search history for completion in X.A.Search 2009-09-20 22:14:55 +00:00
gwern0
d38696bcd5 XMonad.Actions.Search: removeColonPrefix shouldn't throw an exception if no :! 2009-08-08 00:22:24 +00:00
gwern0
bf398ff356 XMonad.Actions.Search: clean up hasPrefix - dupe of Data.List.isPrefixOf 2009-08-08 00:21:20 +00:00
gwern0
41a63a5743 XMonad.Actions.Search: +wikt 2009-08-08 00:06:22 +00:00
Brent Yorgey
a6c4f7659a X.A.Search: use the new canonical package URL for hackage search 2009-06-29 19:24:55 +00:00
Brent Yorgey
6bd66b885a X.A.Search: add Google "I'm feeling lucky" search 2009-06-25 17:37:51 +00:00
Adam Vogt
0cb6ac2910 Use -fwarn-tabs for test, remove tabs 2009-06-24 04:38:31 +00:00
gwern0
10c984ce44 update callers of safeSpawn 2009-06-22 20:14:23 +00:00
Brent Yorgey
451ced82d9 X.A.Search: add Wolfram|Alpha search 2009-05-25 01:04:19 +00:00
gwern0
3c0f793e4a XMonad.Actions.Search: fix whitespace & tabs 2009-01-29 02:52:46 +00:00
Michal Trybus
794f70fb04 xmonad-action-search-intelligent-searchengines
Changed the XMonad.Action.Search to use a function instead of String to prepare the search URL.Added a few useful functions used to connect many search engines together and do intelligent prefixed searches (more doc in haddock)The API has not changed with the only exception of search function, which now accepts a function instead of String.
2009-01-28 10:19:38 +00:00
gwern0
42692986e6 hlintify XUtils, XSelection, Search, WindowGo 2008-12-20 15:33:02 +00:00
sean.escriva
7749dc92d5 documentation: XMonad.Util.Search.hs, add EZConfig keybindings example 2008-11-06 17:17:07 +00:00
gwern0
1e30ffe2c6 Search.hs: +hackage search, courtesy of byorgey 2008-10-31 21:49:37 +00:00
intrigeri
9d409b6b3d Actions.Search: add a few search engines
Add Debian {package, bug, tracking system} search engines, as well as Google
Images and isohunt.
2008-10-08 10:40:33 +00:00
brian
23588c09ae adding thesaurus.reference.com and Google Labs Code Search searches 2008-07-01 09:01:42 +00:00
Brent Yorgey
6530f28720 Actions/Search.hs: export SearchEngine constructor 2008-06-20 21:20:16 +00:00
gwern0
7b81a45619 Actions.Search.hs: switch inappropriate use of getShellCompl for a historyCompletion
It's inappropriate because if I am searching Wikipedia, say, why on earth do I want completion of files and executables on my PC? A previous search query is much more likely to be what I want.
2008-06-07 07:13:31 +00:00
gwern0
12e54671a5 revamp Search.hs to export a replacement for simpleEngine
It's called searchEngine now, and is a wrapper around the SearchEngine type. Different type as well
2008-05-19 19:09:12 +00:00
zhen.sydow
7a3ff21b89 add site name in search prompt dialog 2008-05-18 10:13:57 +00:00
zhen.sydow
0140d63947 add youtube to search engines 2008-05-13 21:25:08 +00:00