/dmenu-websearch

Shorthand for web search based on each own query with dmenu.

Primary LanguageShellMIT LicenseMIT

dmenu-websearch

Shorthand for web search based on each own query with dmenu.

📦 Dependencies

  1. dmenu, is a dynamic menu for X
  2. jq, is a lightweight and flexible command-line JSON processor

🌎 Web Search Queries

.urlquery

[ "Arch:Manpage",        "https://man.archlinux.org/search?q=" ],
[ "Arch:Wiki",           "https://wiki.archlinux.org/index.php?search=" ],
[ "Arch:Packages",       "https://archlinux.org/packages/?q=" ],
[ "Arch:Packages:AUR",   "https://aur.archlinux.org/packages/?K=" ],
[ "DuckDuckGo:Search",   "https://duckduckgo.com/?q=" ],
[ "GitHub:Search",       "https://github.com/search?q=" ],
[ "Google:Search",       "https://duckduckgo.com/?q=!g+" ],
[ "Google:Search:Image", "https://duckduckgo.com/?q=!gi+" ],
[ "Google:Translate",    "https://translate.google.com/?sl=auto&tl=id&text=" ],
[ "Ruby:Gems",           "https://rubygems.org/gems/" ],
[ "Ruby:Toolbox",        "https://www.ruby-toolbox.com/search?q=" ],

🏗️ How to add new query?

Just add new URL query via Add:New:Query menu. It will asking about value of prefix menu & URL query.

🍱 How to use?

Call dmenu-websearch. Choose your prefix menu, or you able to complete the perfix menu with Tab, and write down your keywords.

The form should be like this,

Arch:Packages libreoffice still
^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
 prefix menu      keywords

TIP: You're free to define the prefix menu. My example is just for ease to explaining.

💃 Demo

demo-01

demo-02

🗒️ TODO

  • Create a menu to add a query
  • Retrieve query url value from urlquery file
  • Create urlquery.example and enter the urlquery into gitignore
  • If urlquery does not exist, create new from urlquery.example
  • Do not put in the urlquery file if the menu prefix & query url are empty
  • Create a menu to delete the selected data url query from the urlquery file
  • Create a menu to edit the selected data url query from the urlquery file

🍻 Related Project

* NOTE: Feel free to add your project (if related) here.

  1. link:https://github.com/m0rphism/haskell-dmenu-search[haskell-dmenu-search^], dmenu script for searching the web with customizable search engines.
  2. link:https://gitlab.com/surfraw/Surfraw/[surfraw^], Shell Users' Revolutionary Front Rage Against the Web.

🏛️ Copyright and License

Copyright © 2021 Rizqi Nur Assyaufi.

Free use of this software is granted under the terms of the MIT License.

See LICENSE for details.