A short list of Bash aliases designed to control the Spotify app. I personally use this when I SSH into my home computer and then play my music from there.
This guide is mainly based on Linux but it will work on MacOS as well.
Firstly, open a console and run
sudo nano ~/.bashrc. If you don't have a ~/.bashrc file, it will create one for you.
Next, paste the code from the bashrc file in this repo into the nano terminal.
Then do CONTROL-X, press Y and then ENTER.
Play - Plays the current song
Pause - Pauses the current song
Skip - Skips the current song
Back - Goes to the previous song
The Spotify app has to be open on the host machine in order for this to work.