From d476c7875a181f9a7c1aecf7b0da1ea46749a1cd Mon Sep 17 00:00:00 2001 From: nevaforget Date: Wed, 23 Sep 2026 17:28:34 +0200 Subject: [PATCH] fix(camera): stop hardcoding /usr/bin in the camera scripts --- defaults/bin/moonarch-camera-apply | 3 --- defaults/bin/moonarch-camera-boot | 5 +---- defaults/bin/moonarch-camera-toggle | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/defaults/bin/moonarch-camera-apply b/defaults/bin/moonarch-camera-apply index 1ca6334..1c8e6cf 100755 --- a/defaults/bin/moonarch-camera-apply +++ b/defaults/bin/moonarch-camera-apply @@ -4,9 +4,6 @@ set -eu -PATH=/usr/bin:/bin -export PATH - ID="${1:-}" VAL="${2:-}" diff --git a/defaults/bin/moonarch-camera-boot b/defaults/bin/moonarch-camera-boot index d396928..335bdda 100755 --- a/defaults/bin/moonarch-camera-boot +++ b/defaults/bin/moonarch-camera-boot @@ -4,9 +4,6 @@ set -eu -PATH=/usr/bin:/bin -export PATH - # Cameras enumerate early, but a device behind a hub or dock can still be in flight. settle only # waits for events already queued, so a very late arrival can stay on until the user switches it — # accepted, since it is the same class of gap as plugging one in later. @@ -15,7 +12,7 @@ if command -v udevadm >/dev/null 2>&1; then fi # Reuse the enumeration rather than carrying a second copy of the descriptor walk. -LINES=$(/usr/bin/moonarch-camera-list || true) +LINES=$(moonarch-camera-list || true) [ -n "$LINES" ] || exit 0 printf '%s\n' "$LINES" | while IFS='|' read -r id hw label state kind; do diff --git a/defaults/bin/moonarch-camera-toggle b/defaults/bin/moonarch-camera-toggle index 30f4034..85ae373 100755 --- a/defaults/bin/moonarch-camera-toggle +++ b/defaults/bin/moonarch-camera-toggle @@ -14,4 +14,4 @@ case "$VAL" in *) exit 1 ;; esac -pkexec /usr/bin/moonarch-camera-apply "$ID" "$VAL" +pkexec moonarch-camera-apply "$ID" "$VAL"