Is there a Swift API that can notify when the current active/foreground window changes and provide information about the title of the foreground window, the application name, etc?
Something similar to this, but not only monitoring the current application but all running apps across the system.