Allow web apps to open in the default browser - #11044
Open
VideoPants wants to merge 1 commit into
Open
Conversation
Interactive installs can choose Chromium app windows or xdg-open, and X-Omarchy-WebApp keeps both kinds visible in Omarchy web app menus. Co-authored-by: Cursor <cursoragent@cursor.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
Interactive web app installs can now choose how the launcher opens:
omarchy-launch-webapp(standalone Chromium--app=window)xdg-openso the site uses whatever browser the user set as default (Firefox, Helium, Chrome, etc.)Both kinds of launcher stay on Omarchy’s Remove → Web App list (and related remove paths), because identity is no longer tied solely to
Exec=omarchy-launch-webapp.Why
Today every interactively created web app is forced through Chromium app mode. That is great for “app-like” sites, but it is a poor fit when someone wants:
--app=modePeople who hand-edit
.desktopfiles toxdg-openhit a second problem: Omarchy only treated launchers as web apps whenExec=matchedomarchy-launch-webapp/omarchy-webapp-handler. After switching toxdg-open, those apps disappeared from Remove → Web App even though they were still Omarchy-installed web apps. This change fixes that class of breakage and makes the default-browser option a first-class path.How
omarchy-webapp-install(interactive only)After name / URL / icon, asks via
gum choose:Chromium app window→Exec=omarchy-launch-webapp "<url>"Default browser→Exec=xdg-open "<url>"Non-interactive calls (
omarchy-webapp-install name url icon [custom-exec] [mime-types]) are unchanged: still default toomarchy-launch-webapp, and still honor an explicit custom exec. Installer scripts that create web apps keep working with no argument changes.X-Omarchy-WebApp=truemarkerEvery launcher written by
omarchy-webapp-installnow includes this desktop-entry key. Detection becomes:so:
xdg-opendesktop files are not treated as Omarchy web apps unless markedCall sites updated to the same detection rule
bin/omarchy-webapp-removebin/omarchy-webapp-remove-allbin/omarchy-remove-launcher-entrydefault/omarchy/omarchy-menu.jsonc(remove.webappwhen)Migration (
migrations/1788959623.sh)On update, tags existing user launchers under
~/.local/share/applications/that already look like Omarchy web apps:Execusesomarchy-launch-webapp/omarchy-webapp-handler, orExecisxdg-openwith anhttp(s)URLso people who already switched some apps to the default browser get them back on the remove list without reinstalling.
Tests
Extended
test/shell.d/webapp-install-test.shandwebapp-name-test.shto cover:xdg-open+ markerTest plan
bash test/shell.d/webapp-install-test.shbash test/shell.d/webapp-name-test.sh--app=and remains removablexdg-open-edited web apps reappear under Remove → Web App after marking / migration logic./test/shell(or./test/all) on a clean tree if desiredMade with Cursor