From c4819409f3f58c9087c528b4c63a0d356bb1d876 Mon Sep 17 00:00:00 2001 From: slevi123 <47461741+slevi123@users.noreply.github.com> Date: Sat, 20 Sep 2025 16:58:01 +0300 Subject: [PATCH] BUGFIX: hyprshot returning exit code 1. Hyprshot always exited with code 1. I edited the `checkRunning()` function: - disabling `set -e` for `pgrep` - not that important, but removed wc --- hyprshot | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hyprshot b/hyprshot index 0fb976f..3e0edb0 100755 --- a/hyprshot +++ b/hyprshot @@ -133,10 +133,12 @@ function save_geometry() { function checkRunning() { sleep 1 while [[ 1 == 1 ]]; do - if [[ $(pgrep slurp | wc -m) == 0 ]]; then + set +e + if ! pgrep slurp > /dev/null; then pkill hyprpicker - exit + exit 0 fi + set -e done }