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
|
||||
WHAT="Area"
|
||||
elif [ "$SUBJECT" = "active" ] ; then
|
||||
FOCUSED=$(swaymsg -t get_tree | jq -r 'recurse(.nodes[]?, .floating_nodes[]?) | select(.focused)')
|
||||
GEOM=$(echo "$FOCUSED" | jq -r '.rect | "\(.x),\(.y) \(.width)x\(.height)"')
|
||||
APP_ID=$(echo "$FOCUSED" | jq -r '.app_id')
|
||||
WHAT="$APP_ID window"
|
||||
eval "$( swaymsg -t get_tree |\
|
||||
jq -r '..|try select(.focused == true)|
|
||||
"GEOM=\"\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)\"
|
||||
APP_ID=\"\(.app_id)\"
|
||||
WHAT=\"\(.app_id) window\""' )"
|
||||
elif [ "$SUBJECT" = "screen" ] ; then
|
||||
GEOM=""
|
||||
WHAT="Screen"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue