Register the Chromium native messaging hosts on fresh installs
Chromium ships in the base packages, so it never goes through omarchy-install-browser, and a first install stamps every migration as already applied without running it. That left both bundled extensions loaded from chromium-flags.conf with no host to talk to: Copy URL did nothing at all, since the clipboard write and the toast both live in the host. The user install now registers both hosts itself, and a migration repairs the installs that already missed out — Copy URL since 1784763917 landed, Download Video since 1780517689, unless installing a browser or refreshing Chromium happened to fix them along the way. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VeAd2iERgi7bRSxq2gA1hp
This commit is contained in:
co-authored by
Claude Opus 5
parent
8362c0990a
commit
4d93ad588f
@@ -1,4 +1,5 @@
|
|||||||
run_logged "$OMARCHY_INSTALL/user/theme.sh"
|
run_logged "$OMARCHY_INSTALL/user/theme.sh"
|
||||||
|
run_logged "$OMARCHY_INSTALL/user/chromium.sh"
|
||||||
run_logged "$OMARCHY_INSTALL/user/git.sh"
|
run_logged "$OMARCHY_INSTALL/user/git.sh"
|
||||||
run_logged "$OMARCHY_INSTALL/user/xcompose.sh"
|
run_logged "$OMARCHY_INSTALL/user/xcompose.sh"
|
||||||
run_logged "$OMARCHY_INSTALL/user/mise-work.sh"
|
run_logged "$OMARCHY_INSTALL/user/mise-work.sh"
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Chromium ships in the base packages, so it never goes through
|
||||||
|
# omarchy-install-browser, and fresh installs mark every migration as already
|
||||||
|
# applied. Without this, the bundled extensions load but have no native
|
||||||
|
# messaging host to talk to.
|
||||||
|
omarchy-install-chromium-copy-url
|
||||||
|
omarchy-install-chromium-ytdlp
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
echo "Register the native messaging hosts for the bundled Chromium extensions"
|
||||||
|
|
||||||
|
# Fresh installs stamped 1780517689 and 1784763917 as applied without running
|
||||||
|
# them, so the bundled extensions loaded with no host to talk to.
|
||||||
|
omarchy-install-chromium-copy-url
|
||||||
|
omarchy-install-chromium-ytdlp
|
||||||
@@ -69,6 +69,20 @@ jq -e --arg path "$ROOT/bin/omarchy-chromium-copy-url-host" '
|
|||||||
' "$native_manifest" >/dev/null || fail "copy-url native host manifest uses Omarchy host path and extension id"
|
' "$native_manifest" >/dev/null || fail "copy-url native host manifest uses Omarchy host path and extension id"
|
||||||
pass "copy-url native host installer registers the stable extension id"
|
pass "copy-url native host installer registers the stable extension id"
|
||||||
|
|
||||||
|
# Chromium ships in the base packages, so it never goes through
|
||||||
|
# omarchy-install-browser, and a first install marks every migration as already
|
||||||
|
# applied. The user install has to register the host itself.
|
||||||
|
grep -q 'user/chromium.sh' "$ROOT/install/user/all.sh" ||
|
||||||
|
fail "user install runs the Chromium native messaging host setup"
|
||||||
|
|
||||||
|
fresh_home="$TMPDIR/fresh-install"
|
||||||
|
HOME="$fresh_home" OMARCHY_PATH="$ROOT" PATH="$ROOT/bin:$PATH" \
|
||||||
|
bash -euo pipefail -c 'source "$ROOT/install/user/chromium.sh"'
|
||||||
|
|
||||||
|
[[ -f $fresh_home/.config/chromium/NativeMessagingHosts/com.omarchy.copy_url.json ]] ||
|
||||||
|
fail "fresh install registers the copy-url native messaging host"
|
||||||
|
pass "fresh install registers the copy-url native messaging host"
|
||||||
|
|
||||||
copied_url=$(bash -c '
|
copied_url=$(bash -c '
|
||||||
source "$1"
|
source "$1"
|
||||||
wl-copy() { cat; }
|
wl-copy() { cat; }
|
||||||
|
|||||||
Reference in New Issue
Block a user