Repository navigation
Let menu extensions declare their own providers - #43
Open
villekivela wants to merge 1 commit into
Open
villekivela wants to merge 1 commit into
villekivela wants to merge 1 commit into
Conversation
Mirrors omacom/omarchy#14277: a menu row's provider can be an object with a command printing label/value/current/description rows and an action run with {value} replaced by the row's quoted value. A named provider still comes from PROVIDERS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mirrors omacom/omarchy#14277, which lets an Omarchy menu extension declare its own
provideras an object instead of naming one the shell defines. oma-cast keeps its own copy of the provider table, so without this change those rows would show in Super+Space but not in oma-cast.commandprintslabel\tvalue\tcurrent\tdescriptionrows.actionruns with every{value}replaced by the row's value, already shell-quoted. These are the same rules as #14277.The first user is Omaweb, which lists its open tabs this way (villekivela/omaweb#554). Typing a tab's title in oma-cast then switches to that tab.
Evidence
Live on Omarchy 4.0.6, with Omaweb's tab row from villekivela/omaweb#554 in the menu file, running
oma-cast call rootSearch.search '{"query":"tailscale"}':Tailscale(Remove › Services)After: Results:
Tailscale(Remove › Services), thenMachines - Tailscale(Omaweb tabs), whose action isomaweb focus --raise 'fd04b388-…'node --test tests/*.test.js: 108 pass. New tests intests/omarchy-menu.test.js:omarchy plugin validate pluginpasses, and the shell log shows no QML errors afteroma-cast reload.Merge Danger
Door: two-way
Nothing changes for a menu file without object providers. Named providers (
fonts,power-profiles) take the same path throughproviderSpec.Blast Radius: small
A user's provider command runs in bash on every launcher open, like the built-in providers. The menu file already runs shell through
action,whenandchecked, so this adds no new trust boundary.volatileis accepted but changes nothing here: oma-cast already reruns every provider on each open, and it keeps the old rows until the new ones arrive, so the list doesn't flicker. Omarchy's menu clears them first, so for the moment it takes for a provider to answer, a just-closed tab can still be picked here. Picking it runs the action on a value that no longer exists.🤖 Generated with Claude Code