I am writing a python script to resize and organize windows, just like the
grid plugin does in
compiz-fusion(except that I am on Debian Wheezy).
I am using
wmctrl to get the resolutions of my two screens and compute custom sizes for windows (split horizontally, vertically, etc...):
xrandrtells me how many screen I have and their resolutions
wmctrlgives me original sizes of windows and their location (on which workspace they are displayed)
Unfortunately my 2 screens don't have the same resolution at all, so the only information I am missing is: on which screen the windows is currently displayed so that I can compute new sizes that fit gracefully in this screen.
Is there any command/program that could get this info ?