omarchy-dev-link (lands in a follow-up) writes OMARCHY_PATH=<checkout>
to /etc/omarchy.conf. Three boot/session entry points now source it
before falling back to /usr/share/omarchy:
- /etc/profile.d/omarchy.sh (login shells, SSH)
- config/uwsm/env (Hyprland session via UWSM)
- default/bash/envs (non-login interactive bash; duplicated for
SSH and similar)
All three use 'export OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}"'
so /etc/omarchy.conf wins over the default, and install.sh's script-mode
export wins over /etc/omarchy.conf (because both use the :- guard).
Hyprland updates session env on the fly via hyprctl setenv +
systemctl --user import-environment, so omarchy-dev-link can re-trigger
those to make live sessions pick up the new path without restart.
16 lines
767 B
Bash
16 lines
767 B
Bash
# 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. 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" ;;
|
|
esac
|