VSCode-Spotify

Latest Release Installs Rating All Contributors

Use Spotify inside vscode. Provides integration with Spotify Desktop client.

Note that some of the functionalities are only available on macOS systems (see How it works section)

This extension requires Spotify Premium to work on Windows

How it works

Spotify Web API implementation can be used on any platform, but it does have some drawbacks: * It doesn’t work without internet connection (Linux and OS X implementations do). * Full functionality is only available to Spotify Premium users. * API calls are rate limited.

At the same time it provides tighter integration and it’s more or less future proofed.

Features

Compatibility table

Feature macOS Linux Any Platform (only option on Windows) Web API
Works Offline
Show Current Song
Play Next Song
Play Previous Song
Play
Pause
Play Pause
Mute Volume
Unmute Volume
Mute Unmute Volume
Volume Up
Volume Down
Toggle Repeating (shows repeating state) ⭕
Toggle Shuffling (shows shuffling state) ⭕
Lyrics

Additional Web API features: * Playlists/tracks selection. Make sure you have logged in with the command >Spotify Sign In to use these features. You can open the Virtual Studio Code command line with the hotkey Ctrl+P by default.

Contributing

This project follows the all-contributors specification. Contributions of any kind are welcome, any contributions made will be recognised in the README.

A list of contributors to this project (emoji key):


shyyko.serhiy

💻 🎨 📖 🤔 👀

Levin Rickert

🐛 💻

Marc Riera

💻

Evan Brodie

💻 🐛

Stéphane

📖

Ryan Gordon

📖 🤔

Richard Stanley

💻

realbizkit

💻

Jesús Roldán

💻

Nicolás Gebauer

💻

Muhammad Rivki

💻

Miguel Rodríguez Rosales

💻

Mosh Feu

📖

Adam Parkin

📖

Andrew Bastin

📖

Michael Fox

📖

Matija Mrkaic

💻

Mario

📖

Fernando B

💻

Commands

There are a number of commands available for the extension, and accessible via the command pallette. Find them by searching for “Spotify” in the command pallette:

Commands

Adding or changing hotkeys

All keyboard shortcuts in vscode can be customized via the User/keybindings.json file.

To configure keyboard shortcuts the way you want, go to the menu under File > Preferences > Keyboard Shortcuts. This will open the Default Keyboard Shortcuts on the left and your User/keybindings.json file where you can overwrite the default bindings on the right. You may also see an interface to modify the shortcuts on different versions of vscode.

Example :

{
		"command": "spotify.volumeDown",
		"key": "cmd+shift+g"
}

For more info on hotkeys please look at https://code.visualstudio.com/docs/customization/keybindings

Buttons

This extension provides a variety of buttons to control Spotify from status bar. By default 4 buttons are enabled: 1. Previous track 2. Play / Pause 3. Next track 4. Mute / Unmute

You can modify the shown buttons by changing your parameters (go here to find out how):

"spotify.showNextButton": {
	"type": "boolean",
	"default": true,
	"description": "Whether to show next button."
},
"spotify.showPreviousButton": {
	"type": "boolean",
	"default": true,
	"description": "Whether to show previous button."
},
"spotify.showPlayButton": {
	"type": "boolean",
	"default": false,
	"description": "Whether to show play button."
},
"spotify.showPauseButton": {
	"type": "boolean",
	"default": false,
	"description": "Whether to show pause button."
},
"spotify.showPlayPauseButton": {
	"type": "boolean",
	"default": true,
	"description": "Whether to show play|pause button."
},
"spotify.showMuteVolumeButton": {
	"type": "boolean",
	"default": false,
	"description": "Whether to show mute button."
},
"spotify.showUnmuteVolumeButton": {
	"type": "boolean",
	"default": false,
	"description": "Whether to show unmute button."
},
"spotify.showMuteUnmuteVolumeButton": {
	"type": "boolean",
	"default": true,
	"description": "Whether to show mute|unmute button."
},
"spotify.showVolumeUpButton": {
	"type": "boolean",
	"default": false,
	"description": "Whether to show volume up button."
},
"spotify.showVolumeDownButton": {
	"type": "boolean",
	"default": false,
	"description": "Whether to show volume down button."
}
"spotify.showToggleRepeatingButton": {
	"type": "boolean",
	"default": false,
	"description": "Whether to show toggle repeating button."
},
"spotify.showToggleShufflingButton": {
	"type": "boolean",
	"default": false,
	"description": "Whether to show toggle shuffling button."
}

For the full configuration options go here.

Note that due to limitations of Spotify’s Applescript API toggleRepeatingButton toggles only ‘repeat all’ property of spotify. There is no way to set ‘repeat one’ via vscode-spotify.

You can also change the position of buttons by changing the parameters below:

"spotify.priorityBase": {
	"type": "number",
	"default": 30,
	"description": "Base value of priority for all vscode-spotify elements in Status Bar(priority = basePriority+priority). This is done to avoid 'conflicts' with other extensions. "
},
"spotify.nextButtonPriority": {
	"type": "number",
	"default": 8,
	"description": "Priority of next button."
},
"spotify.previousButtonPriority": {
	"type": "number",
	"default": 10,
	"description": "Priority of previous button."
},
"spotify.playButtonPriority": {
	"type": "number",
	"default": 7,
	"description": "Priority of play button."
},
"spotify.pauseButtonPriority": {
	"type": "number",
	"default": 6,
	"description": "Priority of pause button."
},
"spotify.playPauseButtonPriority": {
	"type": "number",
	"default": 9,
	"description": "Priority of play|pause button."
},
"spotify.muteButtonPriority": {
	"type": "number",
	"default": 5,
	"description": "Priority of mute button."
},
"spotify.unmuteButtonPriority": {
	"type": "number",
	"default": 4,
	"description": "Priority of unmute button."
},
"spotify.muteUnmuteButtonPriority": {
	"type": "number",
	"default": 3,
	"description": "Priority of mute|unmute button."
},
"spotify.volumeUpButtonPriority": {
	"type": "number",
	"default": 2,
	"description": "Priority of volume up button."
},
"spotify.volumeDownButtonPriority": {
	"type": "number",
	"default": 1,
	"description": "Priority of volume down button."
},
"spotify.trackInfoPriority": {
	"type": "number",
	"default": 0,
	"description": "Priority of volume track info."
},
"spotify.toggleRepeatingButtonPriority": {
	"type": "number",
	"default": 11,
	"description": "Priority of toggle repeating button."
},
"spotify.toggleShufflingButtonPriority": {
	"type": "number",
	"default": 12,
	"description": "Priority of toggle shuffling button."
}

Seeking to a specific point in a song

You can use Spotify Seek To command (spotify.seekTo) to seek to the specific point in a song. You can specify hotkey that will seek to a custom time in a song by adding keybinding in keybindings.json. For example:

{
    "command": "spotify.seekTo",
    "key": "alt+d",
    "args": "1:15"
}

MIT LICENSE