aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Hugo Osvaldo Barrera <hugo@barrera.io>2021-07-08 12:04:28 +0200
committerLibravatar Simon Ser <contact@emersion.fr>2021-07-10 13:03:42 +0200
commit96102184ab96c522fe1f9175bc4d5ceb09aa1720 (patch)
tree3d675ec76af77f1c304b35f73a6aebf93f4e7cb8
parentAdd support for touch frame events (diff)
downloadsway-96102184ab96c522fe1f9175bc4d5ceb09aa1720.tar.gz
sway-96102184ab96c522fe1f9175bc4d5ceb09aa1720.tar.zst
sway-96102184ab96c522fe1f9175bc4d5ceb09aa1720.zip
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
113 GEOM=$(slurp -d) 113 GEOM=$(slurp -d)
114 # Check if user exited slurp without selecting the area 114 # Check if user exited slurp without selecting the area
115 if [ -z "$GEOM" ]; then 115 if [ -z "$GEOM" ]; then
116 exit 116 exit 1
117 fi 117 fi
118 WHAT="Area" 118 WHAT="Area"
119elif [ "$SUBJECT" = "active" ] ; then 119elif [ "$SUBJECT" = "active" ] ; then
@@ -132,7 +132,7 @@ elif [ "$SUBJECT" = "window" ] ; then
132 GEOM=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp) 132 GEOM=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp)
133 # Check if user exited slurp without selecting the area 133 # Check if user exited slurp without selecting the area
134 if [ -z "$GEOM" ]; then 134 if [ -z "$GEOM" ]; then
135 exit 135 exit 1
136 fi 136 fi
137 WHAT="Window" 137 WHAT="Window"
138else 138else