ljos/selfspy — pull request #1 by arttaylor (2012-10-12 03:08:11+00:00)
Title: Made window name detection more reliable on OS X, especially with MS apps.

It's a pretty grotty hack with sniff_cocoa.py, but I shell out to osascript to grab the name of the frontmost window if it's not populated in the dictionary list returned by CGWindowListCopyWindowInfo(). I fallback if that fails, as OmniFocus (at least) isn't reliable about the contents of kCGWindowName in full screen mode.