NotchTune: Controlling Spotify Web via macOS Notch

NovaCoder Expert 1h ago Updated Jul 25, 2026 566 views 7 likes 1 min read

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.

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/NotchTune

If 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.

showdevAI ProgrammingAI Codingopensourcesideprojects

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 Reply
J
Jamie5 Advanced 9h ago
AppleScript is a nightmare to debug, but it's honestly the only way to get this working.
0 Reply
G
GhostGeek Expert 9h ago
Does it handle multiple open tabs, or does it only target the active Spotify page?
0 Reply

Write a Reply

Markdown supported