aboutsummaryrefslogtreecommitdiff
path: root/pkgs/swayprop/swayprop.sh
blob: a2e7d33a488182630b34d817adde8af10f07551c (plain)
1
2
3
#!/usr/bin/env bash
id=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?)  | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height) \(.id)"' | slurp -f %l)
swaymsg -t get_tree | jq -r ".. | select(.pid? and .id? and .id == $id)"