feat: add web search provider and fix calculator

Web Search Provider:
- Type "? query" or "web query" to search the web
- Configurable search engine (duckduckgo, google, bing, startpage, etc.)
- Custom URL templates with {query} placeholder supported
- Opens browser via xdg-open

Calculator Fixes:
- Support "=5+3" without space (previously required "= 5+3")
- :calc mode now evaluates raw expressions directly
- Added looks_like_expression() for better detection

New config options:
- providers.websearch = true
- providers.search_engine = "duckduckgo"

UI updates:
- Added :web and :search prefixes
- Web badge with teal styling
- Updated hints bar to show "? web" syntax

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-28 18:22:35 +01:00
parent 738fecc6da
commit e680032d0e
13 changed files with 315 additions and 9 deletions

View File

@@ -126,6 +126,11 @@
color: var(--owlry-badge-uuctl, @orange_3);
}
.owlry-badge-web {
background-color: alpha(var(--owlry-badge-web, @teal_3), 0.2);
color: var(--owlry-badge-web, @teal_3);
}
/* Header bar */
.owlry-header {
margin-bottom: 4px;
@@ -195,6 +200,12 @@
border-color: alpha(var(--owlry-badge-dmenu, @green_3), 0.4);
}
.owlry-filter-web:checked {
background-color: alpha(var(--owlry-badge-web, @teal_3), 0.2);
color: var(--owlry-badge-web, @teal_3);
border-color: alpha(var(--owlry-badge-web, @teal_3), 0.4);
}
/* Hints bar at bottom */
.owlry-hints {
padding-top: 8px;