Skip to content

Instantly share code, notes, and snippets.

@sidorares
Created August 15, 2012 00:54
Show Gist options
  • Save sidorares/3354363 to your computer and use it in GitHub Desktop.
Save sidorares/3354363 to your computer and use it in GitHub Desktop.
import xcb
import xcb.xproto as xproto
conn = xcb.connect()
root = conn.get_setup().roots[0].root
conn.core.ChangeWindowAttributesChecked(self.root, xproto.CW.EventMask, [xproto.EventMask.SubstructureRedirect|xproto.EventMask.SubstructureNotify])
while True:
e = conn.wait_for_event()
print e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment