diff --git a/bin/omarchy-dev-link b/bin/omarchy-dev-link index 4048ba2a..1001ff43 100755 --- a/bin/omarchy-dev-link +++ b/bin/omarchy-dev-link @@ -7,6 +7,14 @@ set -euo pipefail +if [[ $EUID -eq 0 ]]; then + echo "Error: run omarchy-dev-link as your user, not under sudo. The script" >&2 + echo " will prompt for sudo when it needs to write /etc/omarchy.conf." >&2 + echo " (Invoking under sudo wipes HYPRLAND_INSTANCE_SIGNATURE so the" >&2 + echo " live-session refresh can't reach hyprctl.)" >&2 + exit 1 +fi + if [[ $# -ne 1 || $1 == "-h" || $1 == "--help" ]]; then cat < diff --git a/bin/omarchy-dev-unlink b/bin/omarchy-dev-unlink index dbdd0f52..afcd1891 100755 --- a/bin/omarchy-dev-unlink +++ b/bin/omarchy-dev-unlink @@ -5,6 +5,12 @@ set -euo pipefail +if [[ $EUID -eq 0 ]]; then + echo "Error: run omarchy-dev-unlink as your user, not under sudo. The script" >&2 + echo " will prompt for sudo when it needs to remove /etc/omarchy.conf." >&2 + exit 1 +fi + if [[ ${1:-} == "-h" || ${1:-} == "--help" ]]; then cat <