How to count number of windows of certain type?
Hi all,
I often find myself using python scripts that generate a lot of graphs. I'd like to create a script that will count the number of graphs in a workspace and then line them up in a grid - ie if 6 are plotted, arange them all in a 2x3 grid. I know I am going to have to script this - no problem, but the first thing I need to figure out is how to programtically cycle through all the windows in a workspace. I know how to use xprop to get the window type, but I can't seem to find something like (pseudo code):
for window in workspce; goto window; ...
of course, after goto window, you can get the type and keep track of things, etc. Just need to get started. Any help is appreciated!