Ship /etc/profile.d/omarchy.sh defaulting OMARCHY_PATH

For shells outside the install flow (login shells, cron jobs, dev work)
the install.sh-set OMARCHY_PATH isn't in scope. Without a system-wide
default, omarchy-* commands shipped at /usr/bin can't find runtime data
under /usr/share/omarchy/.

profile.d sets OMARCHY_PATH=/usr/share/omarchy if not already set, so
install.sh's override (to $HOME/.local/share/omarchy during script-install)
still wins. The omarchy-dev-link workflow manages a symlink at
/usr/share/omarchy that points at a local checkout when active.

Also prepends $OMARCHY_PATH/bin to PATH if the directory exists (mainly
matters for script-install mode; /usr/bin is on PATH for package mode).
This commit is contained in:
Ryan Hughes
2026-06-04 18:34:04 -04:00
parent 25bd9aec9e
commit f02f4a25b3
+14
View File
@@ -0,0 +1,14 @@
# Default OMARCHY_PATH for non-install shells. install.sh overrides this
# during the install flow to point at the checkout under
# $HOME/.local/share/omarchy when running in script-install (boot.sh) mode.
# omarchy-dev-link (Chunk 4) manages a symlink at /usr/share/omarchy that
# points at a local checkout when active.
export OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}"
# Convenience: prepend Omarchy's user-installable bin to PATH if it exists.
# (Mainly relevant for the script-install path; /usr/bin is already on PATH
# for the package-install path.)
case ":$PATH:" in
*":$OMARCHY_PATH/bin:"*) ;;
*) [ -d "$OMARCHY_PATH/bin" ] && export PATH="$OMARCHY_PATH/bin:$PATH" ;;
esac