Remove hot link / unlink bits
This commit is contained in:
+6
-15
@@ -3,6 +3,8 @@
|
||||
# omarchy:summary=Show the current Omarchy dev-link state
|
||||
# omarchy:group=dev
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
default_target="/usr/share/omarchy"
|
||||
configured="$default_target"
|
||||
conf_present=0
|
||||
@@ -22,8 +24,9 @@ if [[ -f /etc/omarchy.conf ]]; then
|
||||
fi
|
||||
|
||||
if (( linked )); then
|
||||
echo "dev-link: ACTIVE"
|
||||
echo "dev-link: configured"
|
||||
echo " /etc/omarchy.conf -> OMARCHY_PATH=$configured"
|
||||
echo " status: reboot required before all session layers use this checkout"
|
||||
else
|
||||
echo "dev-link: inactive"
|
||||
if (( conf_present )); then
|
||||
@@ -33,19 +36,7 @@ fi
|
||||
|
||||
echo " current shell: OMARCHY_PATH=${OMARCHY_PATH:-<unset>}"
|
||||
|
||||
if (( linked )) && [[ ${OMARCHY_PATH:-} != "$configured" ]]; then
|
||||
if [[ ${OMARCHY_PATH:-$default_target} != "$configured" ]]; then
|
||||
echo
|
||||
echo "Note: this shell predates dev-link. Open a new shell to pick up the change,"
|
||||
echo "or 'export OMARCHY_PATH=$configured' to update just this shell."
|
||||
elif (( ! linked )) && [[ ${OMARCHY_PATH:-$default_target} != "$default_target" ]]; then
|
||||
echo
|
||||
echo "Note: no dev-link is configured, but this shell still has a stale OMARCHY_PATH."
|
||||
echo "Open a new shell or run 'export OMARCHY_PATH=$default_target'."
|
||||
fi
|
||||
|
||||
if command -v hyprctl >/dev/null 2>&1 && hyprctl version &>/dev/null; then
|
||||
hypr_path=$(hyprctl getoption -j env 2>/dev/null | sed -n 's/.*OMARCHY_PATH=\([^"]*\).*/\1/p' | head -1)
|
||||
if [[ -n "$hypr_path" ]]; then
|
||||
echo " hyprland session: OMARCHY_PATH=$hypr_path"
|
||||
fi
|
||||
echo "Note: the running session does not match /etc/omarchy.conf. Reboot to settle it."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user