aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2021-07-08 12:04:28 +0200
committerFurkan Sahin <furkan-dev@proton.me>2021-07-08 12:04:28 +0200
commit11263ae7dc39087a86d71056aba48fef3e95fd26 (patch)
tree3d675ec76af77f1c304b35f73a6aebf93f4e7cb8
parent5e05d9838fa89adec3da35eb9c7f3b4973db1d08 (diff)
grimshot: Exit 1 on cancellation
Whenever the selection is cancelled by the user, exit 1, since not screenshot has been taken.
-rwxr-xr-xcontrib/grimshot4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/grimshot b/contrib/grimshot
index 921837f9..4ce31f29 100755
--- a/contrib/grimshot
+++ b/contrib/grimshot
@@ -113,7 +113,7 @@ elif [ "$SUBJECT" = "area" ] ; then
GEOM=$(slurp -d)
# Check if user exited slurp without selecting the area
if [ -z "$GEOM" ]; then
- exit
+ exit 1
fi
WHAT="Area"
elif [ "$SUBJECT" = "active" ] ; then
@@ -132,7 +132,7 @@ elif [ "$SUBJECT" = "window" ] ; then
GEOM=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp)
# Check if user exited slurp without selecting the area
if [ -z "$GEOM" ]; then
- exit
+ exit 1
fi
WHAT="Window"
else