From f0d06185e645e0c949242789d8ec265913f055fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paulo=20Diovani=20Gon=C3=A7alves?= Date: Fri, 2 Sep 2022 13:01:03 -0300 Subject: [PATCH] Add -r (restrict selection) option to slurp --- contrib/grimshot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/grimshot b/contrib/grimshot index 1ec19def6..ba3b265b7 100755 --- a/contrib/grimshot +++ b/contrib/grimshot @@ -143,7 +143,7 @@ elif [ "$SUBJECT" = "output" ] ; then OUTPUT=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused)' | jq -r '.name') WHAT="$OUTPUT" elif [ "$SUBJECT" = "window" ] ; then - GEOM=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp) + GEOM=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp -r) # Check if user exited slurp without selecting the area if [ -z "$GEOM" ]; then exit 1