This commit is contained in:
Karakurt 2023-07-27 18:12:56 +08:00 committed by GitHub
commit 8f391060c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -131,10 +131,11 @@ elif [ "$SUBJECT" = "area" ] ; then
fi fi
WHAT="Area" WHAT="Area"
elif [ "$SUBJECT" = "active" ] ; then elif [ "$SUBJECT" = "active" ] ; then
FOCUSED=$(swaymsg -t get_tree | jq -r 'recurse(.nodes[]?, .floating_nodes[]?) | select(.focused)') eval "$( swaymsg -t get_tree |\
GEOM=$(echo "$FOCUSED" | jq -r '.rect | "\(.x),\(.y) \(.width)x\(.height)"') jq -r '..|try select(.focused == true)|
APP_ID=$(echo "$FOCUSED" | jq -r '.app_id') "GEOM=\"\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)\"
WHAT="$APP_ID window" APP_ID=\"\(.app_id)\"
WHAT=\"\(.app_id) window\""' )"
elif [ "$SUBJECT" = "screen" ] ; then elif [ "$SUBJECT" = "screen" ] ; then
GEOM="" GEOM=""
WHAT="Screen" WHAT="Screen"