noTunes is a macOS application that will prevent iTunes or Apple Music from launching.
Simply launch the noTunes app and iTunes/Music will no longer be able to launch. For example, when bluetooth headphones reconnect.
You can toggle the apps functionality via the menu bar icon with a simple left click.
brew install --cask notunes
Left click the menu bar icon to toggle between its active states.
Enabled (prevents iTunes/Music from opening)
Disabled (allows iTunes/Music to open)
Right click the menu bar icon and click
Quit noTunes, run the following command in Terminal and re-open the app:
defaults delete digital.twisted.noTunes
To quit the app either:
With menu bar icon visible
Right click the menu bar icon and click quit.
With menu bar icon hidden
Quit the app via Activity Monitor or run the following command in Terminal:
osascript -e 'quit app "noTunes"'
The code is available under the MIT License.