mirror of
https://github.com/swaywm/sway.git
synced 2024-11-21 23:41:27 +00:00
grimshot: Exit 1 on cancellation
Whenever the selection is cancelled by the user, exit 1, since not screenshot has been taken.
This commit is contained in:
parent
7114030159
commit
96102184ab
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue