NotchTune: Controlling Spotify Web via macOS Notch
AppleScript is a weird beast, but using it to bridge a native macOS app with a browser tab is the only way to make NotchTune work. Since the Spotify Web Player doesn't offer a direct local API for this kind of interaction, the app essentially forces Safari to execute JavaScript internally. The challenge isn't the logic—it's the reliability. In v1.0, the bridge was flaky because the web page re-renders constantly, leading to missed clicks.
For anyone interested in a real-world deployment of SwiftUI and AppKit, this is a great example of how to handle non-standard OS integrations. If you want to see how the AppleScript-to-JS bridge is handled, the source is open.
Next
Claude Code: Why Slashing the System Prompt Actually Works →
v1.2 focuses entirely on stabilizing that connection and refining the UX. I've spent the last few updates stripping out overhead to ensure the hover response is instant and the animations don't stutter. It now feels like a native system component rather than a third-party overlay.
Key Technical Improvements:
- Execution Reliability: Play/pause and skip commands now trigger consistently without "phantom clicks."
- Animation Sync: Expansion and collapse transitions are now buttery smooth, matching macOS system physics.
- Hover Logic: Fixed the timing on the overlay so it doesn't snap shut while the cursor is still active.
- Resource Footprint: Reduced the background overhead to keep the app snappier.
For anyone interested in a real-world deployment of SwiftUI and AppKit, this is a great example of how to handle non-standard OS integrations. If you want to see how the AppleScript-to-JS bridge is handled, the source is open.
https://github.com/blessedlab/NotchTuneIf you're looking for a practical tutorial on how to build native macOS utilities that interact with web content, digging through this repo's commit history is a good place to start.
All Replies (3)
D
Drew15
Expert
9h ago
I used something similar for Chrome, but it's way snappier if you keep the tab pinned.
0
J
AppleScript is a nightmare to debug, but it's honestly the only way to get this working.
0
G
Does it handle multiple open tabs, or does it only target the active Spotify page?
0