aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/swaygetcurrentwindow
blob: e6403a60385d8a61f1589bd9b0bcc48aa75f32dc (plain)
1
2
3
4
5
#!/bin/sh

xydata=$(swaymsg -t get_tree | grep -B 5 '"focused": true' | head -n 4 | tr -d '\n\r' | sed -e 's/[^0-9,]//g' -e 's/,/ /2' -e 's/,/x/2')

echo $xydata