mirror of
https://github.com/swaywm/sway.git
synced 2026-04-21 06:46:22 -04:00
Merge 5fce06c20b into 6bd11ad0df
This commit is contained in:
commit
8f391060c2
1 changed files with 5 additions and 4 deletions
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue