diff --git a/config/uwsm/env b/config/uwsm/env index de6fed27..5986de5c 100644 --- a/config/uwsm/env +++ b/config/uwsm/env @@ -1,8 +1,11 @@ # Changes require a restart to take effect. -# Ensure Omarchy bins are in the path. /etc/profile.d/omarchy.sh defaults -# OMARCHY_PATH to /usr/share/omarchy; honor whatever's already set (so -# install.sh's script-mode override wins). +# Source /etc/omarchy.conf so omarchy-dev-link (which writes +# OMARCHY_PATH= there) wins over the default. install.sh's +# script-mode export still wins because the file uses the same :- guard. +# UWSM doesn't source /etc/profile.d/, so this duplicates that logic for the +# Hyprland session. +[ -f /etc/omarchy.conf ] && . /etc/omarchy.conf export OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}" export PATH="$OMARCHY_PATH/bin:$PATH:$HOME/.local/bin" diff --git a/default/bash/envs b/default/bash/envs index efed0bd8..61c1d3dd 100644 --- a/default/bash/envs +++ b/default/bash/envs @@ -6,8 +6,9 @@ export BAT_THEME=ansi export MANROFFOPT="-c" export MANPAGER="sh -c 'col -bx | bat -l man -p'" -# Duplicated from .config/uwsm/env so SSH works too. -# /etc/profile.d/omarchy.sh defaults OMARCHY_PATH to /usr/share/omarchy. -# Honor whatever's already set (so install.sh's script-mode override wins). +# Duplicated from .config/uwsm/env so SSH/non-login shells also see the +# override. /etc/omarchy.conf wins (omarchy-dev-link writes it); +# install.sh's script-mode export wins over that via the :- guard. +[ -f /etc/omarchy.conf ] && . /etc/omarchy.conf export OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}" export PATH="$OMARCHY_PATH/bin:$PATH:$HOME/.local/bin" diff --git a/etc/profile.d/omarchy.sh b/etc/profile.d/omarchy.sh index 01e89366..73f415f4 100644 --- a/etc/profile.d/omarchy.sh +++ b/etc/profile.d/omarchy.sh @@ -1,24 +1,14 @@ -# Default OMARCHY_PATH for non-install shells. -# -# - install.sh sets OMARCHY_PATH to $HOME/.local/share/omarchy during the -# script-install (boot.sh) flow; that wins because of the :- guards. -# - omarchy-dev-link manages /usr/share/omarchy-dev as a symlink to a local -# checkout. When present, it shadows the package install for everything -# that resolves via $OMARCHY_PATH (bin/, default/, shell/, themes/). -# - Otherwise: the package install at /usr/share/omarchy. -if [ -z "${OMARCHY_PATH:-}" ]; then - if [ -d /usr/share/omarchy-dev ]; then - export OMARCHY_PATH=/usr/share/omarchy-dev - else - export OMARCHY_PATH=/usr/share/omarchy - fi -fi +# Source /etc/omarchy.conf first so dev-link or other system overrides can +# pre-set OMARCHY_PATH (and anything else) before the defaults run. +# install.sh's script-mode export still wins because /etc/omarchy.conf uses +# the same :- guard. +[ -f /etc/omarchy.conf ] && . /etc/omarchy.conf +export OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}" # Prepend $OMARCHY_PATH/bin if it exists. In normal package mode this is a # no-op: bins ship to /usr/bin (already on PATH), and /usr/share/omarchy/bin -# doesn't exist. The case that matters is omarchy-dev-link, which exposes the -# checkout's bin/ at /usr/share/omarchy-dev/bin so it can override the -# /usr/bin copies the package installed. +# doesn't exist. When omarchy-dev-link is active OMARCHY_PATH points at a +# local checkout, whose bin/ then overrides the /usr/bin copies. case ":$PATH:" in *":$OMARCHY_PATH/bin:"*) ;; *) [ -d "$OMARCHY_PATH/bin" ] && export PATH="$OMARCHY_PATH/bin:$PATH" ;;