Coder Social home page Coder Social logo

mikejk8s / vscode-spotify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shyykoserhiy/vscode-spotify

0.0 0.0 0.0 872 KB

Use Spotify inside vscode(on Mac, Windows, and Linux).

Home Page: https://marketplace.visualstudio.com/items/shyykoserhiy.vscode-spotify

License: MIT License

TypeScript 100.00%

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 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

  • On macOS, this extension uses spotify-node-applescript (basically a wrapper for the official Spotify AppleScript API) to communicate with Spotify.
  • On Windows, it extension uses the 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 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

  • Shows the currently playing song in the vscode status bar. 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. 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

vscode-spotify's People

Contributors

andrewbastin avatar audstanley avatar ecbrodie avatar k-yle avatar levrik avatar matijamrkaic avatar mikqi avatar misterfoxy avatar moshfeu avatar mrcasals avatar negebauer avatar realbizkit avatar ryan-gordon avatar shyykoserhiy avatar xebuz 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.