The name of this repository was recommended by github
With this potato you can controll your spotify client with the command line. This feature is already implemented in all the desktop environment, but not for all.
There are 1+5 commands for Potato Spotify Signal:
-
help: this is not a real command, this is the return if not matches the other commands Without any arguments the spotato shows what power have.
-
previous This command works as rewinder of the song or if the actual song is in the first seconds (based on Spotify rules) reproduce the previous song.
-
toggle The most common command that everyone use most, if play than pause and if pause play.
It is very simple, if you want to skip song then run spotato next
or if you
want to pause the song just run spotato pause
or even spotato toggle
. Same
thing if you want to listen again the previous song run spotato previous
, or
if the song is in pause and you want to play that the send the spotato command
spotato play
.
That's all, nothing more. Nice and easy.
Obviously this works if you have the spotify client on the machine. You can install it with several ways:
-
(only for debian distros) Adding the repository:
# 1. Add the Spotify repository signing keys to be able to verify downloaded packages sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 931FF8E79F0876134EDDBDCCA87FF9DF48BF1C90 2EBF997C15BDA244B6EBF5D84773BD5E130D1D45 # 2. Add the Spotify repository echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list # 3. Update list of available packages sudo apt-get update # 4. Install Spotify sudo apt-get install spotify-client
Took only 3 steps:
-
Clone the repos:
git clone https://github.com/Wabri/Potato-Spotify-Signal.git
-
Move into the Potato directory:
cd Potato-Spotify-Signal
-
Run with superuser permissions:
sudo bash install.sh
Now you can use the power of the potato music to do what you want.
As you imagine I create this script to use spotify with my i3wm configuration.
Some advices:
-
Some keyboard have the special function keys to controll the media player (I do not), to use spotato with this keys you need to add something like this into your i3wm configuration file:
# Audio control bindsym XF86AudioPrev exec --no-startup-id spotato previous bindsym XF86AudioNext exec --no-startup-id spotato next bindsym XF86AudioPlay exec --no-startup-id spotato toggle
-
Or you can simple create a i3wm mode if you don't have that special keys (like me), something like this:
# Spotify modality set $mode_spotify (h)Previous, (l)Next, (j)Pause, (k)Play, (s)Toggle mode "$mode_spotify" { bindsym k exec --no-startup-id spotato play bindsym j exec --no-startup-id spotato pause bindsym s exec --no-startup-id spotato toggle, mode "default" bindsym l exec --no-startup-id spotato next bindsym h exec --no-startup-id spotato previous # back to normal bindsym q mode "default" bindsym Escape mode "default" } bindsym $mod+s mode "$mode_spotify"
If you have some advices just create a new issue. If you want to add some more feature fork this repository and pull request if you want to help me (or other).