glance icon indicating copy to clipboard operation
glance copied to clipboard

Add search suggestions (with configurable engine) and configurable shortcuts

Open kylerm42 opened this issue 7 months ago • 6 comments

Summary

• Enhanced search widget with configurable shortcuts for quick site navigation and fuzzy matching • Added search suggestions integration with popular search engines (Google, DuckDuckGo, Bing, Startpage) • Navigate directly to URLs, bypassing search engine

Features Added

Shortcuts System:

  • Fuzzy matching against shortcut titles and optional alias text
  • Dropdown interface with keyboard navigation (arrow keys, tab, enter)
  • Exact match prioritization for immediate navigation (e.g. type gm, then Enter to go directly to Gmail)
  shortcuts:
    - title: Gmail
      url: https://mail.google.com
      alias: gm
    - title: GitHub
      url: https://github.com

Search Suggestions:

  • Suggestions from configured search engines with debouncing
  • Automatic fallback to main search engine if not specified
  • Support for custom suggestion endpoints
  • New /api/search/suggestions endpoint to handle requests
  suggestions: true
  suggestion-engine: duckduckgo  # or google, bing, startpage

Direct URL Navigation:

  • Detects when the query is a URL and takes the user there instead of searching for it
  • Supports standard URLs (google.com, www.google.com), HTTP(S) prefixes (https://google.com), localhost (localhost:3000) and IP addresses (192.168.1.1), all with optional ports

Keyboard Navigation:

  • ↓/Tab and ↑/Shift+Tab for dropdown navigation
  • Enter to select highlighted item or perform search
  • Click support for all dropdown items
  • Maintains existing bang functionality and keyboard shortcuts
image

This is similar to #702, but with some extra features. Also relates to issue #700

kylerm42 avatar May 28 '25 14:05 kylerm42

Good work @kylerm42, that's what I was trying to go for! Nice to see that we had the same idea :)) I would've been happy with a PR on the feature set too, so that you didn't have to start from 0 on the features.

rhijjawi avatar May 28 '25 14:05 rhijjawi

Thanks @rhijjawi! I was actually going to work off yours but I'm new to Go, so at this point writing is easier than reading and understanding. Definitely open to bringing in anything from that PR over here though, or vice versa!

kylerm42 avatar May 28 '25 14:05 kylerm42

Amazing feature

russssl avatar Jun 11 '25 09:06 russssl

Great feature

hydr0nium avatar Jul 23 '25 17:07 hydr0nium

has this been implemented?

beatrizq avatar Sep 04 '25 18:09 beatrizq

has this been implemented?

@beatrizq The pull request is still open and not merged so I don't think so

hydr0nium avatar Sep 04 '25 18:09 hydr0nium