1 2 3 4 5 6
#!/usr/bin/env python3 import i3ipc sway = i3ipc.Connection() win = sway.get_tree().find_focused().rect print("{},{} {}x{}".format(win.x, win.y, win.width, win.height))