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

echo "$(swaymsg -t get_tree |\
	jq 'recurse(.nodes[]) | if .focused then .rect else empty end' |\
	tr -d '\n\r' |\
	sed -e 's/[^0-9,]//g' -e 's/,/ /2' -e 's/,/x/2')"