Created
April 11, 2025 22:38
-
-
Save julien/bccca4cbd49a8174da183d692d9f5ac6 to your computer and use it in GitHub Desktop.
Prevent Music.app from launching automatically on macOS
This file contains hidden or 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
-- usage: osascript nomusic.scpt | |
-- prevent Music.app from launching (semi-randomly). | |
-- stupid solution to fix this stupid behaviour: | |
-- loop forever and if we detect that Music.app | |
-- is running we "quit" it, the ideal solution would | |
-- be to able to remove all those defaults .apps ... | |
on is_running(appName) | |
tell application "System Events" to (name of processes) contains appName | |
end is_running | |
repeat while true | |
set mRunning to is_running("Music") | |
if mRunning then | |
tell application "Music" | |
quit | |
end tell | |
end if | |
end repeat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment