The name of this repository was recommended by github
With this potato you can controll your mediaplayer client with the command line. This feature is already implemented in all the desktop environment, but not for all.
NOT ONLY SPOTIFY CAN BE CONTROLL
Works with:
- Spotify
- Headset
- Nuclear
- Chromium browser and derivate like Brave
There are 1+5 commands for spotato:
-
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
.
There is another command to change the default mediaplayer:
spotato mediaplayer
or set by yourself:
spotato mediaplayer <name of the mediaplayer>
That's all, nothing more. Nice and easy.
Took only 3 steps:
-
Clone the repos:
git clone https://github.com/Wabri/Spotato.git
-
Move into the Potato directory:
cd spotato
-
Run with superuser permissions:
./install.sh
Now you can use the power of the potato music to do what you want.
Obviously this works if you have the spotify client on the machine. You can install it with several ways:
- Help page of the official site
- Snapcraft by canonical
- (Only for debian distros) Adding the repository:
# 1. Add the Spotify repository signing keys to be able to verify downloaded packages curl -sS https://download.spotify.com/debian/pubkey.gpg | sudo apt-key add - # 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
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 spotato previous bindsym XF86AudioNext exec spotato next bindsym XF86AudioPlay exec spotato toggle
-
Or you can simple create a i3wm mode if you don't have that special keys (like me), something like this:
set $mode_spotato Media (h) (l) (j) (k) (s) (a) (d) (c) (q) mode "$mode_spotato" { bindsym k exec "spotato play ; notify-send --expire-time=400 --urgency=low " bindsym j exec "spotato pause; notify-send --expire-time=400 --urgency=low " bindsym s exec "spotato toggle; notify-send --expire-time=800 --urgency=normal /", mode "default" bindsym l exec "spotato next; notify-send --expire-time=400 --urgency=low " bindsym h exec "spotato previous; notify-send --expire-time=400 --urgency=low " bindsym d exec i3media vol_up bindsym a exec i3media vol_down #back to normal bindsym q mode "default" bindsym Escape mode "default" } bindsym $mod+s mode "$mode_spotato"
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).
Developer: Wabri
Creator of logo: Munadikieh