Skip to content

Instantly share code, notes, and snippets.

View mjquinn21's full-sized avatar

Matt Quinn mjquinn21

View GitHub Profile
@mjquinn21
mjquinn21 / Pause Media on AirPods Disconnect.rtf
Last active April 18, 2021 16:17
Applescript to pause media from YouTube and Spotify. Works with Google Chrome for YouTube and Chrome and the desktop client for Spotify. Useful to run with Tooth Fairy to pause music when AirPods are disconnected.
How to Use This Script
1. Open Finder
2. Hit ⌘⇧L (Command + Shift + L)
3. Locate the Scripts folder
4. Move Stop_Media_When_AirPods_Disconnect_For_Tooth_Fairy.scpt to ~/Library/Scripts/
5. Open Tooth Fairy preferences
6. Select your AirPods and click “Advanced”
7. Make sure that “Run shell script after disconnecting” is ticked
8. Paste this in there: