Git Product home page Git Product logo

vscode-spotify's Introduction

Latest Release Installs Rating

vscode-spotify

All Contributors

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

Note that some of functionality only available on macOS (see How it works section )

How it works

On macOS this extension uses https://github.com/andrehaveman/spotify-node-applescript (basically a wrapper for https://developer.spotify.com/applescript-api/) to communicate with Spotify.

On Windows it uses Spotify Web Api.

On Linux it uses a combination of dbus and pactl.

Spotify Web Api implementation can be used on any platform but it has some drawbacks:

  • it doesn't work without internet connection (Linux and OsX 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

  • Shows the currently playing song in status bar of vscode. status bar
  • Provides commands for controlling Spotify from vscode.
  • Provides hotkeys of commands.
  • Provides buttons for controlling Spotify from vscode.

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.

Contributing

This project follows the all-contributors specification. Contributions of any kind are welcome, any contributions you make you will be recognised for 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

💻

Adding or changing hotkeys:

All keyboard shortcuts in VS Code 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.

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 variety of buttons to controll spotify from status bar. By default 4 buttons are enabled:

  1. Previous track
  2. Play|pause
  3. Next track
  4. Mute|unmute

You can change what buttons to show by changing 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."
}

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

You can also change position of buttons by changing of this parameters:

"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."
}

MIT

vscode-spotify's People

Contributors

shyykoserhiy avatar levrik avatar audstanley avatar ryan-gordon avatar mrcasals avatar realbizkit avatar ecbrodie avatar xebuz avatar

Watchers

James Cloos avatar Muhammad Rivki avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.