Skip to content

sirJeremyer/SpotifyMenuBar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SpotifyMenuBar

A tiny macOS menu bar app that controls Spotify from a small floating panel — album art, track/artist info, and play/pause/skip buttons. Unlike a normal menu bar dropdown, the panel does not close when you click elsewhere on screen; it stays open until you close it yourself with the × button or click the menu bar icon again.

Requirements

  • macOS 13 or later
  • Xcode Command Line Tools (xcode-select --install)
  • The [Spotify desktop app] installed and running

How to build

cd SpotifyMenuBar
swift build

How to run

.build/debug/SpotifyMenuBar &

A music note icon appears in your menu bar. On first launch, macOS will ask for permission to let the app control Spotify via Automation/AppleScript — click OK. If you miss the prompt or deny it, re-enable it manually at System Settings → Privacy & Security → Automation → SpotifyMenuBar → Spotify.

To stop the app:

pkill -f SpotifyMenuBar

How it works

  • Click the menu bar icon to open/close the panel. It appears pinned to the top-left of your screen.

  • The panel shows the currently playing track's artwork, title, and artist, with previous/play-pause/next controls.

  • Playback state updates automatically via Spotify's PlaybackStateChanged notification, so the panel stays in sync even if you skip tracks from Spotify itself.

How it talks to Spotify

The app uses AppleScript (NSAppleScript) to send playpause, next track, and previous track commands to the Spotify app, and to read the current track's name, artist, and artwork URL. No Spotify account login, API key, or network access to Spotify's servers is required — it only talks to the local Spotify app.

Notes

  • This is a debug build run directly from the terminal — it does not launch automatically at login. If you want that, it would need to be packaged as a proper .app bundle and added to Login Items.
  • Built with Swift Package Manager + AppKit/SwiftUI, no external dependencies.

Credits

Built by sirJeremyer with Claude Code.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages