Skip to content

Calculator in the search box - #6

Open
EnolCook wants to merge 2 commits into
AhmedTheGeek:mainfrom
EnolCook:calculator
Open

EnolCook wants to merge 2 commits into
AhmedTheGeek:mainfrom
EnolCook:calculator

Conversation

@EnolCook

@EnolCook EnolCook commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Builds on #5, only the last commit is new.

3x3, (12+4)/2, 2^10, sqrt 16, 15% * 80, 2pi. The answer is the first row and Enter copies it and closes. Small recursive descent parser, no library. It only runs when the input has a digit and nothing but math-ish characters, and a bare number never gives a result, so 2048 or 1password still just find apps.

Also adds SuggestionSource, which the next PRs plug into.

Screenshots

The clipboard link row becomes the first Suggestion: a title, badge, glyph and
an action. Keeps the calculator and web search out of ResultsView/LauncherPanel
special cases. Also drops the spare ninth row, it was never shown.
3x3, (12+4)/2, 2^10, sqrt(2), 15% * 80. The result is the first row and Enter
copies it. Small parser on the raw input, no dependency. Also adds
SuggestionSource so the next features stay out of the panel.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant