VS Music Extension for VS Code

A Visual Studio Code extension that displays currently playing music information and provides playback controls directly in your editor. Perfect for Linux developers who want to stay in their coding flow while managing their music.
📸 Screenshots

The extension showing current track information in VS Code with the music player panel and status bar integration
✨ Features
- Status Bar Integration: Shows current track info (title, artist) in VS Code's status bar
- Music Explorer Panel: Dedicated panel in the Explorer sidebar with music controls
- Playback Controls: Play/pause, next/previous track controls
- Real-time Updates: Automatically updates when tracks change
- Corner Widget: Optional floating widget for quick access
- Configurable Display: Customize what information is shown and where
🐧 Linux Compatibility :: ( we are adding for win and mac shortly)
This extension is specifically designed for Linux systems and uses playerctl
to communicate with MPRIS-compatible media players.
Supported Music Players
The following Linux music players are supported through MPRIS/playerctl:
- Spotify
- VLC Media Player
- Rhythmbox
- Audacious
- Clementine
- Strawberry
- Amarok
- Banshee
- Totem
- mpv (with MPRIS script)
- Chromium/Chrome (when playing media)
- Firefox (when playing media)
- And any other MPRIS-compatible player
📦 Installation
Prerequisites
Important: You must have playerctl
installed on your Linux system for this extension to work.
Install playerctl
Ubuntu/Debian:
sudo apt update
sudo apt install playerctl
Fedora/CentOS/RHEL:
sudo dnf install playerctl
# or for older versions:
sudo yum install playerctl
Arch Linux:
sudo pacman -S playerctl
openSUSE:
sudo zypper install playerctl
From Source (if not available in repos):
git clone https://github.com/altdesktop/playerctl.git
cd playerctl
meson builddir
cd builddir
ninja
sudo ninja install
Verify Installation
Test that playerctl works with your music player:
# Check if playerctl is installed
playerctl --version
# Test with your music player (start playing music first)
playerctl metadata
playerctl status
Install the Extension
From VS Code Marketplace:
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "VS Music" by codershubinc
- Click Install
From VSIX file:
- Download the
music-0.0.1.vsix
file from releases
- Open VS Code
- Press Ctrl+Shift+P and type "Extensions: Install from VSIX"
- Select the downloaded .vsix file
From GitHub:
🚀 Usage
- Start your music player (Spotify, VLC, etc.)
- Begin playing music
- The extension will automatically detect and display track information
Available Commands
Access these commands via the Command Palette (Ctrl+Shift+P):
Music: Toggle Widget
- Show/hide the music widget
Music: Toggle Corner Widget
- Show/hide corner widget
Music: Play/Pause
- Toggle playback
Music: Next Track
- Skip to next track
Music: Previous Track
- Go to previous track
Music: Show Music Panel
- Open the music panel
Music: Refresh
- Refresh music information
UI Components
Status Bar
- Shows current track information in the status bar
- Click to play/pause
- Configurable position (left/right)
Music Explorer Panel
- Located in the Explorer sidebar
- Shows detailed track information
- Includes playback controls
- Shows album art (when available)
- Optional floating widget
- Quick access to controls
- Minimal and unobtrusive
⚙️ Configuration
Configure the extension through VS Code settings (File → Preferences → Settings, then search for "music"):
{
"music.enableStatusBar": true,
"music.statusBarPosition": "right",
"music.statusBarPriority": 100,
"music.updateInterval": 1000,
"music.showAlbumArt": true,
"music.maxTitleLength": 30
}
Settings Reference
Setting |
Type |
Default |
Description |
music.enableStatusBar |
boolean |
true |
Show music info in status bar |
music.statusBarPosition |
string |
"right" |
Position of music info ("left" or "right" ) |
music.statusBarPriority |
number |
100 |
Priority of music status bar item |
music.updateInterval |
number |
1000 |
Update interval in milliseconds |
music.showAlbumArt |
boolean |
true |
Show album art in music panel |
music.maxTitleLength |
number |
30 |
Maximum length of song title in status bar |
🔧 Troubleshooting
Common Issues
"playerctl not available" message
- Solution: Install playerctl using your distribution's package manager (see Installation section)
- Verify: Run
playerctl --version
in terminal
Extension doesn't detect music
- Check: Ensure your music player supports MPRIS
- Test: Run
playerctl metadata
while music is playing
- Restart: Try restarting VS Code after starting your music player
No controls working
Track info not updating
- Check: Increase the update interval in settings if on a slower system
- Restart: Restart both your music player and VS Code
To get debug information:
- Open VS Code Developer Tools (Help → Toggle Developer Tools)
- Check the Console tab for VS Music extension logs
- Look for error messages related to playerctl
Getting Help
If you encounter issues:
- Check that playerctl works with your music player
- Verify your music player supports MPRIS
- Check VS Code's Developer Console for errors
- Create an issue with your system info:
- Linux distribution and version
- Music player and version
- playerctl version
- Error messages from console
The extension works with any audio format supported by your music player, including:
- MP3, FLAC, OGG, AAC, WAV
- Streaming services (Spotify, YouTube Music in browser)
- Internet radio streams
- Podcasts and audiobooks
🤝 Contributing
Contributions are welcome! This extension is specifically designed for Linux systems.
Development Setup
- Clone the repository:
git clone https://github.com/codershubinc/vscode-music.git
- Navigate to music directory:
cd vscode-music/music
- Install dependencies:
bun install
- Open in VS Code
- Press F5 to launch Extension Development Host
- Test with your favorite Linux music player
Building
# Compile TypeScript
bun run compile
# Package extension
bun run package
# Create VSIX
bun run build-vsix
👨💻 Author
Swapnil Ingle (@codershubinc)
- Extension Name: VS Music
- Publisher: codershubinc
- Version: 0.0.1
- Category: Other
- License: MIT
- Engine: VS Code ^1.103.0
🏷️ Keywords
music
, player
, spotify
, vlc
, linux
, playerctl
, mpris
, status-bar
, media-control
, audio
, playback
, music-info
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- playerctl - The backbone that makes this extension possible
- The MPRIS specification for standardized media player control
- VS Code Extension API documentation
- The Linux audio community
Enjoy coding with your favorite tunes! 🎶