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:
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user