I am making a window tiling script using libwnck. I would like to detect when the user opens a new window in order to resize it. Here is the gist of my code so far:
import gi
gi.require_version("Wnck", "3.0")
from gi.repository import Wnck
screen = Wnck.Screen.get_default()
screen.force_update()
# Here I resize all windows in the current workspace using
# window.set_geometry
# The script ends here however I'd like it to continue forever
# and detect a "window opened event"
From the documentation it looks like there are virtual methods like do_window_opened
but I have no idea how to get it working in python.