Normalize hard-coded ~/.local/share/omarchy refs to $OMARCHY_PATH

The package-installed paths live at /usr/share/omarchy; the script-install
paths live at ~/.local/share/omarchy. $OMARCHY_PATH is set by install.sh
during the install flow and by /etc/profile.d/omarchy.sh in package mode.
Scripts that hard-code the script-install path don't honour that and will
misbehave once shipped to /usr/bin.

16 files migrated via sed s|~/\.local/share/omarchy|$OMARCHY_PATH|g
and s|$HOME/\.local/share/omarchy|$OMARCHY_PATH|g:

bin/:
- omarchy-plymouth-{preview,reset,set}
- omarchy-refresh-{limine,plymouth}
- omarchy-reinstall-configs
- omarchy-show-logo
- omarchy-games-retro-install
- omarchy-install-gaming-battlenet

install/:
- config/branding.sh
- packaging/{fonts,icons}.sh
- post-install/{finished,pacman}.sh
- preflight/{migrations,pacman}.sh

Deliberately NOT migrated:
- bin/omarchy-dev-add-migration: uses 'cd ~/.local/share/omarchy' to
  resolve a git repo for 'git log'. The packaged binary doesn't have a
  git repo to read; this command only makes sense in dev mode where
  the home path is the right one.
- bin/omarchy-install-browser:69: writes a string into a chromium
  config file that chromium itself interprets; not a bash-resolved path.
- install/helpers/errors.sh:125: the boot.sh-style relaunch behaviour
  needs a separate redesign.
This commit is contained in:
Ryan Hughes
2026-06-04 18:34:04 -04:00
parent 12826d4076
commit 510636b8c9
15 changed files with 21 additions and 21 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ icon_dir="$desktop_dir/icons"
icon_path="$icon_dir/Retro Gaming.png"
mkdir -p "$desktop_dir" "$icon_dir"
[[ -f $icon_path ]] || cp "$HOME/.local/share/omarchy/applications/icons/Retro Gaming.png" "$icon_path"
[[ -f $icon_path ]] || cp "$OMARCHY_PATH/applications/icons/Retro Gaming.png" "$icon_path"
cat >"$desktop_file" <<EOF
[Desktop Entry]
+2 -2
View File
@@ -64,9 +64,9 @@ EOF
fi
mkdir -p "$HOME/.local/share/applications" "$HOME/.local/share/icons/hicolor/48x48/apps"
install -m 644 "$HOME/.local/share/omarchy/applications/battlenet.desktop" \
install -m 644 "$OMARCHY_PATH/applications/battlenet.desktop" \
"$HOME/.local/share/applications/battlenet.desktop"
install -m 644 "$HOME/.local/share/omarchy/applications/icons/Battle.net.png" \
install -m 644 "$OMARCHY_PATH/applications/icons/Battle.net.png" \
"$HOME/.local/share/icons/hicolor/48x48/apps/Battle.net.png"
gtk-update-icon-cache "$HOME/.local/share/icons/hicolor" &>/dev/null || true
update-desktop-database "$HOME/.local/share/applications" 2>/dev/null || true
+1 -1
View File
@@ -35,7 +35,7 @@ fi
staging_dir=$(mktemp -d)
trap 'rm -rf "$staging_dir"' EXIT
find ~/.local/share/omarchy/default/plymouth -maxdepth 1 -type f -exec cp -t "$staging_dir/" {} +
find $OMARCHY_PATH/default/plymouth -maxdepth 1 -type f -exec cp -t "$staging_dir/" {} +
cp "$logo_path" "$staging_dir/logo.png"
for asset in bullet.png entry.png lock.png; do
+1 -1
View File
@@ -5,7 +5,7 @@
theme_dir="/usr/share/plymouth/themes/omarchy"
sudo find ~/.local/share/omarchy/default/plymouth -maxdepth 1 -type f -exec cp -t "$theme_dir/" {} +
sudo find $OMARCHY_PATH/default/plymouth -maxdepth 1 -type f -exec cp -t "$theme_dir/" {} +
sudo plymouth-set-default-theme omarchy
if omarchy-cmd-present limine-mkinitcpio; then
+2 -2
View File
@@ -42,7 +42,7 @@ theme_dir="/usr/share/plymouth/themes/omarchy"
staging_dir=$(mktemp -d)
trap 'rm -rf "$staging_dir"' EXIT
find ~/.local/share/omarchy/default/plymouth -maxdepth 1 -type f -exec cp -t "$staging_dir/" {} +
find $OMARCHY_PATH/default/plymouth -maxdepth 1 -type f -exec cp -t "$staging_dir/" {} +
cp "$logo_path" "$staging_dir/logo.png"
sed -i \
@@ -65,7 +65,7 @@ fi
# Sync the SDDM login screen with the same colors and logo.
sddm_dir="/usr/share/sddm/themes/omarchy"
sddm_template="$HOME/.local/share/omarchy/default/sddm/omarchy/Main.qml"
sddm_template="$OMARCHY_PATH/default/sddm/omarchy/Main.qml"
sed \
-e "s/#1a1b26/#$bg_hex/g" \
+1 -1
View File
@@ -11,7 +11,7 @@ echo "Resetting limine config"
sudo mv /boot/limine.conf /boot/limine.conf.bak
sudo cp ~/.local/share/omarchy/default/limine/limine.conf /boot/limine.conf
sudo cp $OMARCHY_PATH/default/limine/limine.conf /boot/limine.conf
sudo limine-update
sudo limine-snapper-sync
+1 -1
View File
@@ -3,7 +3,7 @@
# omarchy:summary=Overwrite the user config for the Plymouth drive decryption and boot sequence with the Omarchy default and rebuild it.
# omarchy:requires-sudo=true
sudo cp -r ~/.local/share/omarchy/default/plymouth/* /usr/share/plymouth/themes/omarchy/
sudo cp -r $OMARCHY_PATH/default/plymouth/* /usr/share/plymouth/themes/omarchy/
sudo plymouth-set-default-theme omarchy
if command -v limine-mkinitcpio &>/dev/null; then
+2 -2
View File
@@ -13,8 +13,8 @@ if (( EUID == 0 )); then
fi
echo "Resetting all Omarchy configs"
cp -R ~/.local/share/omarchy/config/* ~/.config/
cp ~/.local/share/omarchy/default/bashrc ~/.bashrc
cp -R $OMARCHY_PATH/config/* ~/.config/
cp $OMARCHY_PATH/default/bashrc ~/.bashrc
echo '[[ -f ~/.bashrc ]] && . ~/.bashrc' | tee ~/.bash_profile >/dev/null
$(bash $OMARCHY_PATH/install/config/theme.sh)
+1 -1
View File
@@ -4,6 +4,6 @@
clear
echo -e "\033[32m"
cat <~/.local/share/omarchy/logo.txt
cat <$OMARCHY_PATH/logo.txt
echo -e "\033[0m"
echo
+2 -2
View File
@@ -1,4 +1,4 @@
# Allow the user to change the branding for fastfetch and screensaver
mkdir -p ~/.config/omarchy/branding
cp ~/.local/share/omarchy/icon.txt ~/.config/omarchy/branding/about.txt
cp ~/.local/share/omarchy/logo.txt ~/.config/omarchy/branding/screensaver.txt
cp $OMARCHY_PATH/icon.txt ~/.config/omarchy/branding/about.txt
cp $OMARCHY_PATH/logo.txt ~/.config/omarchy/branding/screensaver.txt
+1 -1
View File
@@ -1,4 +1,4 @@
# Omarchy logo glyphs as a font (used by the omarchy-shell bar's left module)
mkdir -p ~/.local/share/fonts
cp ~/.local/share/omarchy/config/omarchy.ttf ~/.local/share/fonts/
cp $OMARCHY_PATH/config/omarchy.ttf ~/.local/share/fonts/
fc-cache
+1 -1
View File
@@ -6,7 +6,7 @@ echo_in_style() {
clear
echo
tte -i ~/.local/share/omarchy/logo.txt --canvas-width 0 --anchor-text c --frame-rate 920 laseretch
tte -i $OMARCHY_PATH/logo.txt --canvas-width 0 --anchor-text c --frame-rate 920 laseretch
echo
# Display installation time if available
+2 -2
View File
@@ -1,6 +1,6 @@
# Configure pacman
sudo cp -f ~/.local/share/omarchy/default/pacman/pacman-${OMARCHY_MIRROR:-stable}.conf /etc/pacman.conf
sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist-${OMARCHY_MIRROR:-stable} /etc/pacman.d/mirrorlist
sudo cp -f $OMARCHY_PATH/default/pacman/pacman-${OMARCHY_MIRROR:-stable}.conf /etc/pacman.conf
sudo cp -f $OMARCHY_PATH/default/pacman/mirrorlist-${OMARCHY_MIRROR:-stable} /etc/pacman.d/mirrorlist
if lspci -nn | grep -q "106b:180[12]"; then
cat <<EOF | sudo tee -a /etc/pacman.conf >/dev/null
+1 -1
View File
@@ -1,6 +1,6 @@
OMARCHY_MIGRATIONS_STATE_PATH=~/.local/state/omarchy/migrations
mkdir -p $OMARCHY_MIGRATIONS_STATE_PATH
for file in ~/.local/share/omarchy/migrations/*.sh; do
for file in $OMARCHY_PATH/migrations/*.sh; do
touch "$OMARCHY_MIGRATIONS_STATE_PATH/$(basename "$file")"
done
+2 -2
View File
@@ -3,8 +3,8 @@ if [[ -n ${OMARCHY_ONLINE_INSTALL:-} ]]; then
omarchy-pkg-add base-devel
# Configure pacman
sudo cp -f ~/.local/share/omarchy/default/pacman/pacman-${OMARCHY_MIRROR:-stable}.conf /etc/pacman.conf
sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist-${OMARCHY_MIRROR:-stable} /etc/pacman.d/mirrorlist
sudo cp -f $OMARCHY_PATH/default/pacman/pacman-${OMARCHY_MIRROR:-stable}.conf /etc/pacman.conf
sudo cp -f $OMARCHY_PATH/default/pacman/mirrorlist-${OMARCHY_MIRROR:-stable} /etc/pacman.d/mirrorlist
sudo pacman-key --recv-keys 40DFB630FF42BCFFB047046CF0134EE680CAC571 --keyserver keys.openpgp.org
sudo pacman-key --lsign-key 40DFB630FF42BCFFB047046CF0134EE680CAC571