mac-activate — Bring an App to the Foreground
Activates a specified macOS application and brings its window to the front using AppleScript.
Usage
python3 mac_activate.py "Finder"
python3 mac_activate.py "Terminal"
python3 mac_activate.py "Safari"
python3 mac_activate.py "Google Chrome"
How it works
- Sends
tell application "<name>" to activateviaosascript - Can also list currently running (non-background) apps via System Events
Requirements
- macOS with
osascript(pre-installed)