Created
February 12, 2022 11:46
-
-
Save code-yeongyu/a2a39764ab6dc099965fe4cfbd3ec650 to your computer and use it in GitHub Desktop.
macOS Quit Command
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
from os import system | |
from sys import argv | |
if len(argv) > 1: | |
commands = [ | |
f'osascript -e \'quit app "{app_name}"\'' for app_name in argv[1:] | |
] | |
system(';'.join(commands)) | |
else: | |
print("Usage: quit.py <application name>") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment