Skip to content

Instantly share code, notes, and snippets.

@code-yeongyu
Created February 12, 2022 11:46
Show Gist options
  • Save code-yeongyu/a2a39764ab6dc099965fe4cfbd3ec650 to your computer and use it in GitHub Desktop.
Save code-yeongyu/a2a39764ab6dc099965fe4cfbd3ec650 to your computer and use it in GitHub Desktop.
macOS Quit Command
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