Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/omarchy-cmd-browser-handoff
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ case $(type -P "$1") in
/usr/bin/brave) profile=BraveSoftware/Brave-Browser flags=brave-flags.conf ;;
/usr/bin/brave-origin) profile=BraveSoftware/Brave-Origin flags=brave-origin-flags.conf ;;
/usr/bin/microsoft-edge-stable) profile=microsoft-edge flags=microsoft-edge-stable-flags.conf ;;
/usr/bin/helium-browser) profile=net.imput.helium flags=helium-browser-flags.conf ;;
*) exit 1 ;;
esac
shift
Expand Down
6 changes: 4 additions & 2 deletions bin/omarchy-default-browser
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# omarchy:summary=Set the default browser for Omarchy and XDG handlers
# omarchy:args=[chromium|chrome|brave|brave-origin|edge|firefox|zen]
# omarchy:args=[chromium|chrome|brave|brave-origin|edge|firefox|zen|helium]
# omarchy:examples=omarchy default browser firefox | omarchy default browser brave

installing=false
Expand All @@ -20,6 +20,7 @@ if (($# == 0)); then
microsoft-edge.desktop) echo "edge" ;;
firefox.desktop) echo "firefox" ;;
zen.desktop) echo "zen" ;;
helium.desktop) echo "helium" ;;
*) echo "$current_browser" ;;
esac
exit 0
Expand All @@ -33,8 +34,9 @@ brave-origin) browser="brave-origin"; command="brave-origin"; desktop_id="brave-
edge) browser="edge"; command="microsoft-edge-stable"; desktop_id="microsoft-edge.desktop"; name="Edge"; glyph=󰇩 ;;
firefox) browser="firefox"; command="firefox"; desktop_id="firefox.desktop"; name="Firefox"; glyph=󰈹 ;;
zen) browser="zen"; command="zen-browser"; desktop_id="zen.desktop"; name="Zen"; glyph=󰖟 ;;
helium) browser="helium"; command="helium-browser"; desktop_id="helium.desktop"; name="Helium"; glyph= ;;
*)
echo "Usage: omarchy-default-browser <chromium|chrome|brave|brave-origin|edge|firefox|zen>"
echo "Usage: omarchy-default-browser <chromium|chrome|brave|brave-origin|edge|firefox|zen|helium>"
exit 1
;;
esac
Expand Down
14 changes: 11 additions & 3 deletions bin/omarchy-install-browser
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

# omarchy:summary=Install a supported browser
# omarchy:args=<chromium|chrome|brave|brave-origin|edge|firefox|zen>
# omarchy:examples=omarchy install browser chromium | omarchy install browser firefox
# omarchy:args=<chromium|chrome|brave|brave-origin|edge|firefox|zen|helium>
# omarchy:examples=omarchy install browser chromium | omarchy install browser firefox | omarchy install browser helium

set -e

Expand Down Expand Up @@ -115,8 +115,16 @@ zen)
omarchy-lifecycle-dispatch post-install zen
announce_browser_installed "Zen"
;;
helium)
echo "Installing Helium..."
omarchy-pkg-add helium-browser-bin || exit 1
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Resolved

copy_chromium_flags ~/.config/helium-browser-flags.conf
omarchy-lifecycle-dispatch post-install helium
announce_browser_installed "Helium"
;;
*)
echo "Usage: omarchy-install-browser <chromium|chrome|brave|brave-origin|edge|firefox|zen>"
echo "Usage: omarchy-install-browser <chromium|chrome|brave|brave-origin|edge|firefox|zen|helium>"
exit 1
;;
esac
15 changes: 8 additions & 7 deletions bin/omarchy-install-browser-extensions
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/bin/bash

# omarchy:summary=Install Omarchy's bundled extensions in a Chromium-based browser, or check they are current
# omarchy:args=[--check] <chromium|chrome|brave|brave-origin|edge>
# omarchy:args=[--check] <chromium|chrome|brave|brave-origin|edge|helium>
# omarchy:examples=omarchy install browser extensions chromium | omarchy install browser extensions --check chrome
# omarchy:requires-sudo=true
# omarchy:hidden=true

# Every browser reaches the bundled extensions through copies taken when it was
# set up: Chromium, Brave and Edge load them from the --load-extension line in
# their flags file, Google Chrome (which ignores that flag) force-installs the
# signed CRXs through its managed policy, and each profile registers native
# hosts that must admit the extensions' ids. A new extension or new ids leave
# those copies behind. Only Chrome's policy needs root.
# set up: Chromium, Brave, Edge and Helium load them from the --load-extension
# line in their flags file, Google Chrome (which ignores that flag)
# force-installs the signed CRXs through its managed policy, and each profile
# registers native hosts that must admit the extensions' ids. A new extension or
# new ids leave those copies behind. Only Chrome's policy needs root.

set -euo pipefail

Expand All @@ -30,8 +30,9 @@ chromium) profile=chromium; flags=chromium-flags.conf ;;
brave) profile=BraveSoftware/Brave-Browser; flags=brave-flags.conf ;;
brave-origin) profile=BraveSoftware/Brave-Origin; flags=brave-origin-flags.conf ;;
edge) profile=microsoft-edge; flags=microsoft-edge-stable-flags.conf ;;
helium) profile=net.imput.helium; flags=helium-browser-flags.conf ;;
*)
echo "Usage: omarchy-install-browser-extensions [--check] <chromium|chrome|brave|brave-origin|edge>" >&2
echo "Usage: omarchy-install-browser-extensions [--check] <chromium|chrome|brave|brave-origin|edge|helium>" >&2
exit 1
;;
esac
Expand Down
1 change: 1 addition & 0 deletions bin/omarchy-install-chromium-copy-url
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ browser_dirs=(
"$HOME/.config/BraveSoftware/Brave-Origin-Nightly"
"$HOME/.config/microsoft-edge"
"$HOME/.config/microsoft-edge-dev"
"$HOME/.config/net.imput.helium"
)

manifest=$(sed "s|__HOST_PATH__|$HOST_PATH|g" "$TEMPLATE")
Expand Down
1 change: 1 addition & 0 deletions bin/omarchy-install-chromium-ytdlp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ browser_dirs=(
"$HOME/.config/BraveSoftware/Brave-Origin-Nightly"
"$HOME/.config/microsoft-edge"
"$HOME/.config/microsoft-edge-dev"
"$HOME/.config/net.imput.helium"
)

manifest=$(sed "s|__HOST_PATH__|$HOST_PATH|g" "$TEMPLATE")
Expand Down
11 changes: 8 additions & 3 deletions bin/omarchy-remove-browser
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

# omarchy:summary=Remove a supported browser and clean up Omarchy browser defaults
# omarchy:args=<chrome|chromium|brave|brave-origin|edge|firefox|zen>
# omarchy:examples=omarchy remove browser firefox | omarchy remove browser brave
# omarchy:args=<chrome|chromium|brave|brave-origin|edge|firefox|zen|helium>
# omarchy:examples=omarchy remove browser firefox | omarchy remove browser brave | omarchy remove browser helium
# omarchy:requires-sudo=true

set_fallback_default_browser() {
Expand Down Expand Up @@ -73,8 +73,13 @@ zen)
set_fallback_default_browser zen.desktop
omarchy-pkg-drop zen-browser-bin
;;
helium)
echo "Removing Helium..."
set_fallback_default_browser helium.desktop
omarchy-pkg-drop helium-browser-bin
;;
Comment thread
torturado marked this conversation as resolved.
Resolved
*)
echo "Usage: omarchy-remove-browser <chrome|chromium|brave|brave-origin|edge|firefox|zen>"
echo "Usage: omarchy-remove-browser <chrome|chromium|brave|brave-origin|edge|firefox|zen|helium>"
exit 1
;;
esac
9 changes: 9 additions & 0 deletions default/i18n/en/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,9 @@
"setup.default.browser.zen": {
"label": "Zen"
},
"setup.default.browser.helium": {
"label": "Helium"
},
"setup.default.dictation": {
"label": "Dictation",
"title": "Default Dictation"
Expand Down Expand Up @@ -820,6 +823,9 @@
"install.browser.zen": {
"label": "Zen"
},
"install.browser.helium": {
"label": "Helium"
},
"install.service.1password": {
"label": "1Password"
},
Expand Down Expand Up @@ -1102,6 +1108,9 @@
"remove.browser.zen": {
"label": "Zen"
},
"remove.browser.helium": {
"label": "Helium"
},
"remove.service.1password": {
"label": "1Password"
},
Expand Down
3 changes: 3 additions & 0 deletions default/omarchy/omarchy-menu.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@
"setup.default.browser.edge": {"icon":"󰇩","label":"Edge","checked":"[[ \"$(omarchy-default-browser)\" == \"edge\" ]]","action":"omarchy-default-browser edge"},
"setup.default.browser.firefox": {"icon":"","label":"Firefox","checked":"[[ \"$(omarchy-default-browser)\" == \"firefox\" ]]","action":"omarchy-default-browser firefox"},
"setup.default.browser.zen": {"icon":"󰖟","label":"Zen","checked":"[[ \"$(omarchy-default-browser)\" == \"zen\" ]]","action":"omarchy-default-browser zen"},
"setup.default.browser.helium": {"icon":"","label":"Helium","checked":"[[ \"$(omarchy-default-browser)\" == \"helium\" ]]","action":"omarchy-default-browser helium"},
"setup.default.dictation": {"icon":"","label":"Dictation","title":"Default Dictation"},
"setup.default.dictation.hex": {"icon":"","label":"Hex","checked":"[[ \"$(omarchy-default-dictation)\" == \"hex\" ]]","action":"omarchy-default-dictation hex"},
"setup.default.dictation.superwhisper": {"icon":"","label":"Superwhisper","checked":"[[ \"$(omarchy-default-dictation)\" == \"superwhisper\" ]]","action":"omarchy-default-dictation superwhisper"},
Expand Down Expand Up @@ -311,6 +312,7 @@
"install.browser.brave-origin": {"icon":"","label":"Brave Origin","disabled":"omarchy-pkg-present brave-origin-bin","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-install-browser brave-origin'"},
"install.browser.firefox": {"icon":"","label":"Firefox","disabled":"omarchy-pkg-present firefox","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-install-browser firefox'"},
"install.browser.zen": {"icon":"󰖟","label":"Zen","disabled":"omarchy-pkg-present zen-browser-bin","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-install-browser zen'"},
"install.browser.helium": {"icon":"","label":"Helium","disabled":"omarchy-pkg-present helium-browser-bin","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-install-browser helium'"},
"install.service.1password": {"icon":"󰢁","label":"1Password","disabled":"omarchy-pkg-present 1password","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-service-1password"},
"install.service.bitwarden": {"icon":"󰟵","label":"Bitwarden","disabled":"omarchy-pkg-present bitwarden","action":"omarchy-install-and-launch Bitwarden 'bitwarden bitwarden-cli' bitwarden"},
"install.service.dropbox": {"icon":"","label":"Dropbox","when":"[[ $(getconf PAGESIZE) == 4096 ]]","disabled":"omarchy-pkg-present dropbox","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-service-dropbox"},
Expand Down Expand Up @@ -406,6 +408,7 @@
"remove.browser.brave-origin": {"icon":"","label":"Brave Origin","when":"omarchy-pkg-present brave-origin-bin","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-remove-browser brave-origin'"},
"remove.browser.firefox": {"icon":"","label":"Firefox","when":"omarchy-pkg-present firefox","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-remove-browser firefox'"},
"remove.browser.zen": {"icon":"","label":"Zen","when":"omarchy-pkg-present zen-browser-bin","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-remove-browser zen'"},
"remove.browser.helium": {"icon":"","label":"Helium","when":"omarchy-pkg-present helium-browser-bin","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-remove-browser helium'"},
"remove.service.1password": {"icon":"󰢁","label":"1Password","when":"omarchy-pkg-present 1password","action":"omarchy-launch-floating-terminal-with-presentation omarchy-remove-service-1password"},
"remove.service.dropbox": {"icon":"","label":"Dropbox","when":"omarchy-pkg-present dropbox","action":"omarchy-launch-floating-terminal-with-presentation omarchy-remove-service-dropbox"},
"remove.service.tailscale": {"icon":"","iconFont":"omarchy","label":"Tailscale","when":"omarchy-pkg-present tailscale","action":"omarchy-launch-floating-terminal-with-presentation omarchy-remove-service-tailscale"},
Expand Down
6 changes: 6 additions & 0 deletions test/shell.d/chromium-extensions-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ repair brave-origin || fail "a commented-out --load-extension switch can be repa
fail "the repair adds a live --load-extension switch" "$(<"$flags_file")"
pass "switching to a browser repairs the bundled extensions it lacks and keeps the user's own"

# Helium keeps its profile and flags file under its own names, and switching to
# it fails unless the repair reaches both.
repair helium || fail "Helium's bundled extensions can be repaired"
repair --check helium || fail "a repaired Helium's bundled extensions are reported current"
pass "switching to Helium sets up its bundled extensions"

# --- WhatsApp Slim ---

# The content script switches WhatsApp Web to its system theme mode, which it
Expand Down
13 changes: 13 additions & 0 deletions test/shell.d/default-apps-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ omarchy-pkg-add|omarchy-pkg-aur-add)
chromium) command=chromium ;;
firefox) command=firefox ;;
zen-browser-bin) command=zen-browser ;;
helium-browser-bin) command=helium-browser ;;
cursor-bin) command=cursor ;;
sublime-text-4) command=subl ;;
vim) command=vim ;;
Expand All @@ -92,6 +93,7 @@ omarchy-install-browser)
edge) command=microsoft-edge-stable ;;
firefox) command=firefox ;;
zen) command=zen-browser ;;
helium) command=helium-browser ;;
esac
;;
omarchy-install-terminal)
Expand Down Expand Up @@ -182,6 +184,7 @@ browser_cases=(
'edge microsoft-edge-stable browser:edge'
'firefox firefox browser:firefox'
'zen zen-browser browser:zen'
'helium helium-browser browser:helium'
)

terminal_cases=(
Expand Down Expand Up @@ -288,6 +291,16 @@ grep -Fxq "sudo:install -m 644 -o root -g root -T $ROOT/default/firefox/policies
[[ -e $installed_dir/zen-browser ]] || fail "Zen browser installer marks zen-browser installed"
pass "Zen browser installer restores the complete Omarchy setup"

: >"$install_log"
: >"$setup_log"
rm -f "$installed_dir/helium-browser"
OMARCHY_TEST_REAL_BROWSER_INSTALL=true omarchy-default-browser --install helium >/dev/null
[[ $(<"$install_log") == "pkg:helium-browser-bin" ]] || fail "Helium browser installer installs the package"
[[ $(omarchy-default-browser) == "helium" ]] || fail "Helium becomes the default after its full installer succeeds"
cmp -s "$ROOT/config/chromium-flags.conf" "$test_home/.config/helium-browser-flags.conf" ||
fail "Helium browser installer copies the default flags to the file its wrapper reads"
pass "Helium browser installer restores the complete Omarchy setup"

omarchy-default-browser zen
rm -f "$installed_dir/chromium"
if OMARCHY_TEST_REAL_BROWSER_INSTALL=true OMARCHY_TEST_INSTALL_FAIL=true \
Expand Down