Skip to content

Web Search

The native interface supports quick web searches via URL templates. Type a keyword followed by your query to open search results in your default browser.

Define custom search engines with keywords and URL templates. When you type a keyword and query, Raffi opens your browser with the search results.

Configure web searches in your raffi.yaml:

addons:
web_searches:
- name: "Google"
keyword: "g"
url: "https://google.com/search?q={query}"
icon: "google"
- name: "DuckDuckGo"
keyword: "ddg"
url: "https://duckduckgo.com/?q={query}"
icon: "duckduckgo"
- name: "GitHub"
keyword: "gh"
url: "https://github.com/search?q={query}"
icon: "github"
- name: "Wikipedia"
keyword: "wiki"
url: "https://en.wikipedia.org/wiki/Special:Search?search={query}"
icon: "wikipedia"

name string (required)

Display name shown in the search row (e.g., “Search Google for…”)

keyword string (required)

Text that activates the web search (e.g., “g”, “ddg”)

url string (required)

URL template with {query} placeholder for search terms

icon string

Icon name from your icon cache to display next to the search row

Type a keyword followed by your search query:

g rust traits
# Opens: https://google.com/search?q=rust%20traits
ddg wayland compositor
# Opens: https://duckduckgo.com/?q=wayland%20compositor
gh iced-rs
# Opens: https://github.com/search?q=iced-rs
wiki functional programming
# Opens: https://en.wikipedia.org/wiki/Special:Search?search=functional%20programming
  1. Type Keyword

    Type the configured keyword (e.g., g)

  2. Add Query

    Type your search query after the keyword

  3. See Preview

    Raffi displays “Search [Name] for [query]”

  4. Execute Search

    Press Enter to open browser with search results

The {query} placeholder is automatically percent-encoded for safe URL use:

  • Spaces become %20
  • Special characters are encoded (e.g., &%26)
  • Unreserved characters remain unchanged (A-Z, a-z, 0-9, -, ., _, ~)
g hello world
→ https://google.com/search?q=hello%20world

Common search engines you can add:

General Search
- name: "Google"
keyword: "g"
url: "https://google.com/search?q={query}"
icon: "google"
- name: "DuckDuckGo"
keyword: "ddg"
url: "https://duckduckgo.com/?q={query}"
icon: "duckduckgo"
- name: "Bing"
keyword: "b"
url: "https://www.bing.com/search?q={query}"
icon: "bing"
Development
- name: "GitHub"
keyword: "gh"
url: "https://github.com/search?q={query}"
icon: "github"
- name: "Stack Overflow"
keyword: "so"
url: "https://stackoverflow.com/search?q={query}"
icon: "stackoverflow"
- name: "Crates.io"
keyword: "crate"
url: "https://crates.io/search?q={query}"
icon: "rust"
- name: "NPM"
keyword: "npm"
url: "https://www.npmjs.com/search?q={query}"
icon: "npm"
- name: "Docker Hub"
keyword: "docker"
url: "https://hub.docker.com/search?q={query}"
icon: "docker"
Reference
- name: "Wikipedia"
keyword: "wiki"
url: "https://en.wikipedia.org/wiki/Special:Search?search={query}"
icon: "wikipedia"
- name: "MDN"
keyword: "mdn"
url: "https://developer.mozilla.org/en-US/search?q={query}"
icon: "firefox"
- name: "Rust Docs"
keyword: "rdoc"
url: "https://doc.rust-lang.org/std/?search={query}"
icon: "rust"
Media
- name: "YouTube"
keyword: "yt"
url: "https://www.youtube.com/results?search_query={query}"
icon: "youtube"
- name: "Reddit"
keyword: "r"
url: "https://www.reddit.com/search?q={query}"
icon: "reddit"
- name: "Twitter"
keyword: "tw"
url: "https://twitter.com/search?q={query}"
icon: "twitter"
Shopping
- name: "Amazon"
keyword: "amz"
url: "https://www.amazon.com/s?k={query}"
icon: "amazon"
- name: "eBay"
keyword: "ebay"
url: "https://www.ebay.com/sch/i.html?_nkw={query}"
icon: "ebay"

You can add any search engine that accepts a query parameter:

  1. Perform a Search

    Go to the website and search for “test”

  2. Copy URL

    Look at the browser address bar:

    https://example.com/search?q=test
  3. Replace Query

    Replace “test” with {query}:

    https://example.com/search?q={query}
  4. Add to Config

    - name: "Example"
    keyword: "ex"
    url: "https://example.com/search?q={query}"
- name: "Search Rust Reddit"
keyword: "rr"
url: "https://www.reddit.com/r/rust/search?q={query}&restrict_sr=1"
icon: "reddit"
  • Enter: Open search in default browser
  • Esc: Cancel and return to normal mode

Here’s a complete example with popular search engines:

addons:
web_searches:
# General
- name: "Google"
keyword: "g"
url: "https://google.com/search?q={query}"
icon: "google"
- name: "DuckDuckGo"
keyword: "ddg"
url: "https://duckduckgo.com/?q={query}"
# Development
- name: "GitHub"
keyword: "gh"
url: "https://github.com/search?q={query}"
icon: "github"
- name: "Stack Overflow"
keyword: "so"
url: "https://stackoverflow.com/search?q={query}"
- name: "Crates.io"
keyword: "crate"
url: "https://crates.io/search?q={query}"
icon: "rust"
# Reference
- name: "Wikipedia"
keyword: "wiki"
url: "https://en.wikipedia.org/wiki/Special:Search?search={query}"
icon: "wikipedia"
- name: "MDN"
keyword: "mdn"
url: "https://developer.mozilla.org/en-US/search?q={query}"
# Media
- name: "YouTube"
keyword: "yt"
url: "https://www.youtube.com/results?search_query={query}"
icon: "youtube"