mirror of
https://github.com/swaywm/sway.git
synced 2026-04-22 06:46:27 -04:00
Use slurp -o to select outputs instead of parsing swaymsg -t get_tree
This commit is contained in:
parent
49545189ac
commit
f752aa7629
1 changed files with 1 additions and 1 deletions
|
|
@ -137,7 +137,7 @@ elif [ "$SUBJECT" = "window" ] ; then
|
||||||
fi
|
fi
|
||||||
WHAT="Window"
|
WHAT="Window"
|
||||||
elif [ "$SUBJECT" = "selection" ] ; then
|
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
|
# Check if user exited slurp without selecting the area
|
||||||
if [ -z "$GEOM" ]; then
|
if [ -z "$GEOM" ]; then
|
||||||
exit
|
exit
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue