#!/usr/bin/env python # # Written by nigeltao@gnome.org. # Released into the public domain on January 2007. # # This program will print geometry and title information for all windows on all # workspaces, including windows that are created *after* this program starts. import gtk, wnck def on_window_opened(screen, window): print window.get_geometry(), window.get_name() wnck.screen_get_default().connect('window-opened', on_window_opened) try: gtk.main() except (KeyboardInterrupt, SystemExit): # This try/except block is purely to avoid an ugly error message when # you hit Control-C to stop the program. pass