From d7adaee06bc3bedb5005f4b3a842e25a1970f8bf Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 25 May 2026 17:29:02 +0200 Subject: [PATCH] Move 1pw to an optional install since we need to install the chrome extension anyway as well as login --- bin/omarchy-install-service-1password | 34 +++++++++++++++++++++++++++ bin/omarchy-remove-preinstalls | 1 + bin/omarchy-remove-service-1password | 13 ++++++++++ default/omarchy/omarchy-menu.jsonc | 1 + install/omarchy-base.packages | 2 -- 5 files changed, 49 insertions(+), 2 deletions(-) create mode 100755 bin/omarchy-install-service-1password create mode 100755 bin/omarchy-remove-service-1password diff --git a/bin/omarchy-install-service-1password b/bin/omarchy-install-service-1password new file mode 100755 index 00000000..f59cab92 --- /dev/null +++ b/bin/omarchy-install-service-1password @@ -0,0 +1,34 @@ +#!/bin/bash + +# omarchy:summary=Install 1Password and its Chromium extension. +# omarchy:requires-sudo=true + +set -e + +EXTENSION_ID="aeblfdkhhhdcdjpifhhbdiojplfjncoa" +EXTENSION_DIR="/usr/share/chromium/extensions" +EXTENSION_FILE="$EXTENSION_DIR/$EXTENSION_ID.json" +WEBSTORE_UPDATE_URL="https://clients2.google.com/service/update2/crx" + +install_chromium_extension() { + if omarchy-cmd-missing chromium; then + echo "Chromium is not installed; skipping 1Password Chromium extension." + return + fi + + sudo mkdir -p "$EXTENSION_DIR" + printf '{ "external_update_url": "%s" }\n' "$WEBSTORE_UPDATE_URL" | sudo tee "$EXTENSION_FILE" >/dev/null + sudo chmod 644 "$EXTENSION_FILE" +} + +echo "Installing 1Password..." +omarchy-pkg-add 1password 1password-cli + +echo "Installing 1Password extension for Chromium..." +install_chromium_extension + +echo "Opening 1Password..." +uwsm-app -- 1password >/dev/null 2>&1 & + +echo "" +echo "1Password has been installed. Restart Chromium to load the browser extension." diff --git a/bin/omarchy-remove-preinstalls b/bin/omarchy-remove-preinstalls index 3c560f2c..12f85c40 100755 --- a/bin/omarchy-remove-preinstalls +++ b/bin/omarchy-remove-preinstalls @@ -23,6 +23,7 @@ if gum confirm "Are you sure you want to remove all preinstalled web apps, TUI w typora \ spotify \ libreoffice-fresh \ + 1password \ 1password-beta \ 1password-cli \ xournalpp \ diff --git a/bin/omarchy-remove-service-1password b/bin/omarchy-remove-service-1password new file mode 100755 index 00000000..9aaed45a --- /dev/null +++ b/bin/omarchy-remove-service-1password @@ -0,0 +1,13 @@ +#!/bin/bash + +# omarchy:summary=Remove 1Password and its Chromium extension. +# omarchy:requires-sudo=true + +EXTENSION_ID="aeblfdkhhhdcdjpifhhbdiojplfjncoa" +EXTENSION_FILE="/usr/share/chromium/extensions/$EXTENSION_ID.json" + +sudo rm -f "$EXTENSION_FILE" +omarchy-pkg-drop 1password 1password-cli + +echo "" +echo "1Password has been removed." diff --git a/default/omarchy/omarchy-menu.jsonc b/default/omarchy/omarchy-menu.jsonc index d828ca65..146361b4 100644 --- a/default/omarchy/omarchy-menu.jsonc +++ b/default/omarchy/omarchy-menu.jsonc @@ -170,6 +170,7 @@ "install.browser.brave-origin": {"icon":"","label":"Brave Origin","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-install-browser brave-origin'"}, "install.browser.firefox": {"icon":"","label":"Firefox","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-install-browser firefox'"}, "install.browser.zen": {"icon":"󰖟","label":"Zen","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-install-browser zen'"}, + "install.service.1password": {"icon":"󰢁","label":"1Password","keywords":"password","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-service-1password"}, "install.service.dropbox": {"icon":"","label":"Dropbox","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-dropbox"}, "install.service.tailscale": {"icon":"","label":"Tailscale","keywords":"vpn","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-tailscale"}, "install.service.nordvpn": {"icon":"󱇱","label":"NordVPN [AUR]","keywords":"vpn","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-nordvpn"}, diff --git a/install/omarchy-base.packages b/install/omarchy-base.packages index 343d38c1..de39dcf1 100644 --- a/install/omarchy-base.packages +++ b/install/omarchy-base.packages @@ -1,8 +1,6 @@ # Omarchy core package list installed via install/packaging/base.sh # This file is also used by the ISO builder when determining needs -1password -1password-cli aether alsa-utils asdcontrol