-
-
Save reacuna/19df031db946dfa71b8ceb36eb0beedf to your computer and use it in GitHub Desktop.
Identify which app or process is stealing focus on OSX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from AppKit import NSWorkspace | |
import time | |
t = range(1,100) | |
for i in t: | |
time.sleep(3) | |
activeAppName = NSWorkspace.sharedWorkspace().activeApplication()['NSApplicationName'] | |
print activeAppName | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment