A sleek macOS menu bar application that displays your currently playing media information right in your menu bar. SwiftMediaBar provides a clean, unobtrusive way to see what's playing across all your media applications.
- Real-time Media Display: Shows currently playing song, artist, and album in your menu bar
- Universal Compatibility: Works with Apple Music, Spotify, and other media applications
- Album Artwork: Displays album artwork when available
- Playback Status: Shows play/pause status and progress information
- Clean Interface: Minimalist design that doesn't clutter your menu bar
- Lightweight: Runs efficiently in the background with minimal resource usage
- Auto-refresh: Updates every 5 seconds to keep information current
The app shows a compact view of your current media in the menu bar:
♪ Artist Name - Song Title
Click the menu bar item to see detailed information including:
- Album artwork
- Full song title, artist, and album
- Playback status
- Additional metadata (genre, track number, source app)
- macOS: Compatible with all macOS versions including the latest macOS Sonoma
- media-control: Version 0.7.2 (automatically handles media information retrieval)
- Xcode: 15.0 or later (for building from source)
- Download the latest release from the Releases page
- Unzip the downloaded file
- Move
SwiftMediaBar.appto your Applications folder - Install the required dependency (see below)
-
Clone this repository:
git clone https://github.com/bilipp/SwiftMediaBar.git cd SwiftMediaBar -
Open the project in Xcode:
open SwiftMediaBar.xcodeproj
-
Build and run the project (⌘+R)
SwiftMediaBar requires the media-control command-line tool to function. Install it using Homebrew:
brew install media-controlImportant: Only version 0.7.2 of media-control has been tested and confirmed to work with SwiftMediaBar. If you encounter issues, ensure you're using this specific version:
brew install media-control@0.7.2- Launch SwiftMediaBar from your Applications folder
- The app will appear in your menu bar with a musical note (♪) icon
- Start playing music in any supported application
- The menu bar will update to show your current media information
- No Media: Shows "♪" when nothing is playing
- Loading: Shows "♪ Loading..." while fetching information
- Playing: Shows "♪ Artist - Song Title" (truncated to fit)
- Error: Shows "♪ Error" if there's an issue
Click the menu bar item to open a popover with detailed information:
- Album artwork (when available)
- Full song title, artist, and album names
- Playback status (playing/paused)
- Additional metadata like genre and track number
- Source application information
Click the menu bar item and select "Quit SwiftMediaBar" from the popover.
SwiftMediaBar works with any application that provides media information through macOS's Media Remote framework, including:
- Apple Music
- Spotify
- iTunes
- VLC
- QuickTime Player
- Safari (for web-based media)
- Chrome (for web-based media)
- And many more!
SwiftMediaBar works out of the box with minimal configuration needed. The app automatically:
- Updates every 5 seconds
- Truncates long titles to fit in the menu bar
- Handles different media sources
- Manages album artwork display
Currently, SwiftMediaBar focuses on simplicity and doesn't require configuration. Future versions may include:
- Custom update intervals
- Display format options
- Menu bar text length preferences
Cause: The media-control dependency might not be installed or accessible.
Solutions:
-
Verify media-control is installed:
which media-control
Should return:
/opt/homebrew/bin/media-control -
Test media-control directly:
media-control get
-
Reinstall media-control:
brew uninstall media-control brew install media-control
Cause: Permission issues or media-control execution problems.
Solutions:
- Check if media-control has proper permissions
- Restart SwiftMediaBar
- Ensure your media application is actually playing content
Cause: The app might have crashed or failed to launch properly.
Solutions:
- Check Activity Monitor for SwiftMediaBar process
- Try launching from Terminal to see error messages:
/Applications/SwiftMediaBar.app/Contents/MacOS/SwiftMediaBar
- Restart your Mac if the issue persists
Cause: Caching or timing issues with media updates.
Solutions:
- Wait a few seconds for the next automatic update
- Restart SwiftMediaBar
- Check if the source media application is responding properly
If you encounter issues not covered here:
- Check the Issues page for similar problems
- Create a new issue with:
- Your macOS version
- media-control version (
media-control --version) - Steps to reproduce the problem
- Any error messages
SwiftMediaBar/
├── SwiftMediaBar/
│ ├── SwiftMediaBarApp.swift # Main app entry point
│ ├── Managers/
│ │ └── MenuBarManager.swift # Menu bar management
│ ├── Services/
│ │ └── MediaService.swift # Media information service
│ ├── Models/
│ │ └── MediaInfo.swift # Media data model
│ └── Views/
│ └── MenuView.swift # Popover UI
├── SwiftMediaBarTests/ # Unit tests
└── SwiftMediaBarUITests/ # UI tests
- MenuBarManager: Handles menu bar item creation and updates
- MediaService: Interfaces with media-control to fetch media information
- MediaInfo: Data model representing current media state
- MenuView: SwiftUI view for the detailed popover interface
- Open
SwiftMediaBar.xcodeprojin Xcode - Select the SwiftMediaBar scheme
- Build with ⌘+B or run with ⌘+R
- Run tests with ⌘+U
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- media-control: Command-line tool for media information retrieval
- Repository: ungive/media-control
- Required version: 0.7.2
- License: MIT
This project is licensed under the MIT License.
- ungive/media-control - Essential command-line tool that makes this app possible
- menubar-ticker - General idea of a menu bar media ticker
- Apple's MediaRemote framework - Underlying technology for media information access
- The Swift and SwiftUI communities for excellent documentation and examples
- Initial release
- Basic media information display in menu bar
- Detailed popover view with album artwork
- Support for all major media applications
- Integration with media-control 0.7.2
Note: This app is not affiliated with Apple Inc. or any media application providers. It simply displays information that's already available through macOS's built-in media frameworks.

