feat: add calculator provider and frecency tracking

Calculator:
- Type "= expression" or "calc expression" for instant math evaluation
- Supports standard math functions (sqrt, sin, cos, etc.) and constants (pi, e)
- Copies result to clipboard on Enter via wl-copy

Frecency:
- Firefox-style algorithm: score = launch_count * recency_weight
- Boosts frequently and recently launched items in search results
- Persists to ~/.local/share/owlry/frecency.json
- Configurable via providers.frecency and providers.frecency_weight

New config options:
- providers.calculator = true
- providers.frecency = true
- providers.frecency_weight = 0.3

UI updates:
- Added :calc prefix support
- Calculator badge with yellow styling
- Updated hints to show "= calc" 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 17:16:01 +01:00
parent a1351f05e9
commit 738fecc6da
15 changed files with 872 additions and 27 deletions

View File

@@ -106,6 +106,11 @@
color: var(--owlry-badge-app, @blue_3);
}
.owlry-badge-calc {
background-color: alpha(var(--owlry-badge-calc, @yellow_3), 0.2);
color: var(--owlry-badge-calc, @yellow_3);
}
.owlry-badge-cmd {
background-color: alpha(var(--owlry-badge-cmd, @purple_3), 0.2);
color: var(--owlry-badge-cmd, @purple_3);
@@ -166,6 +171,12 @@
border-color: alpha(var(--owlry-badge-app, @blue_3), 0.4);
}
.owlry-filter-calc:checked {
background-color: alpha(var(--owlry-badge-calc, @yellow_3), 0.2);
color: var(--owlry-badge-calc, @yellow_3);
border-color: alpha(var(--owlry-badge-calc, @yellow_3), 0.4);
}
.owlry-filter-cmd:checked {
background-color: alpha(var(--owlry-badge-cmd, @purple_3), 0.2);
color: var(--owlry-badge-cmd, @purple_3);