Created
July 25, 2017 14:56
-
-
Save e23z/6e82676e9915155b1cd7e08d95ed1db9 to your computer and use it in GitHub Desktop.
[Focus Monitor] A python script to monitor and display which app is capturing the focus of your mac screen. #utils #scripts #macos
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