From f752aa7629399382bb5d37edc5c37b64099af8b4 Mon Sep 17 00:00:00 2001 From: Ragnar Groot Koerkamp Date: Fri, 25 Jun 2021 13:07:23 +0200 Subject: [PATCH] Use slurp -o to select outputs instead of parsing swaymsg -t get_tree --- contrib/grimshot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/grimshot b/contrib/grimshot index 900e9a10c..e20c2480c 100755 --- a/contrib/grimshot +++ b/contrib/grimshot @@ -137,7 +137,7 @@ elif [ "$SUBJECT" = "window" ] ; then fi WHAT="Window" elif [ "$SUBJECT" = "selection" ] ; then - GEOM=$(swaymsg -t get_tree | jq -r '.. | select((.pid? and .visible?) or (.type == "output" and .active)) | .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 -o) # Check if user exited slurp without selecting the area if [ -z "$GEOM" ]; then exit