Repository navigation
feat: choose a separate browser for web apps #11975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
r4lphio
wants to merge
10
commits into
omacom:quattro
Choose a base branch
from
r4lphio:feat/webapp-browser
base: quattro
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4b22358
feat: choose a separate browser for web apps
r4lphio b582f91
fix: open Helium removal in a terminal for authentication
r4lphio 254bd59
fix: keep Helium menu entries and coverage consistent
r4lphio d6d3899
docs: link web app limitations to upstream reports
r4lphio bbb2ef7
test: cover web app browser lookup and running browser handoff
r4lphio 3aa3442
docs: move Zen research notes to the pull request
r4lphio 20ad3eb
fix: set up Helium like the other Chromium browsers
r4lphio 265045c
fix: add English catalog entries for web app browser text
r4lphio 0d9f2ae
docs: install Helium before selecting it for web apps
r4lphio a9967b1
test: move web app browser checks into the browser suites
r4lphio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| #!/bin/bash | ||
|
|
||
| # omarchy:summary=Choose a web app browser independently of the default browser | ||
| # omarchy:args=[auto|chromium|chrome|brave|brave-origin|edge|helium|opera|vivaldi] | ||
| # omarchy:examples=omarchy default webapp-browser helium | omarchy default webapp-browser auto | ||
|
|
||
| set -e | ||
| config="${XDG_CONFIG_HOME:-$HOME/.config}/omarchy/webapp-browser" | ||
|
|
||
| if (( $# == 0 )); then | ||
| if [[ -f $config ]]; then | ||
| cat "$config" | ||
| else | ||
| echo auto | ||
| fi | ||
| exit 0 | ||
| fi | ||
|
|
||
| case "$1" in | ||
| auto) desktop_id=auto ;; | ||
| chromium) command=chromium; desktop_id=chromium.desktop; name="Chromium" ;; | ||
| chrome) command=google-chrome-stable; desktop_id=google-chrome.desktop; name="Chrome" ;; | ||
| brave) command=brave; desktop_id=brave-browser.desktop; name="Brave" ;; | ||
| brave-origin) command=brave-origin; desktop_id=brave-origin.desktop; name="Brave Origin" ;; | ||
| edge) command=microsoft-edge-stable; desktop_id=microsoft-edge.desktop; name="Edge" ;; | ||
| helium) command=helium-browser; desktop_id=helium.desktop; name="Helium" ;; | ||
| opera) command=opera; desktop_id=opera.desktop; name="Opera" ;; | ||
| vivaldi) command=vivaldi-stable; desktop_id=vivaldi-stable.desktop; name="Vivaldi" ;; | ||
| *) | ||
| echo "Usage: omarchy-default-webapp-browser <auto|chromium|chrome|brave|brave-origin|edge|helium|opera|vivaldi>" >&2 | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| if [[ $desktop_id != "auto" ]] && omarchy-cmd-missing "$command"; then | ||
| echo "Install $1 with 'omarchy install browser $1' before selecting it as the web app browser." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| mkdir -p "$(dirname "$config")" | ||
| temporary=$(mktemp "${config}.XXXXXX") | ||
| trap 'rm -f "$temporary"' EXIT | ||
| printf '%s\n' "$desktop_id" > "$temporary" | ||
| mv -f "$temporary" "$config" | ||
|
|
||
| if [[ $desktop_id == "auto" ]]; then | ||
| omarchy-notification-send -g "$(omarchy-i18n default.webappBrowserAuto)" | ||
| else | ||
| omarchy-notification-send -g "$(omarchy-i18n default.webappBrowserSet "$name")" | ||
| fi |
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.