This project aims to overcome the problem the latest spotify versions introduced, which is that they have removed the tray icon and the possibility to minimize the player to tray on the Linux official client. This has forced many users to use the outdated client, which had this feature.
What this program does:
- Finds a running instance of spotify (or launches a new one).
- Creates a Tray icon with a menu to control playback (play/pause, next, previous).
- Adds the possiblity to hide the spotify client (minimize to tray).
- A Linux distribuition (as the problem is not present on Windows/MacOS)
- Python >= 3 (to run the script)
- PyQt4 (to manage tray icon and menu)
- xdotool (to hide/show spotify)
- playerctl (to control playback)
AUR Support will be added later
Clone the PKGBUILD
Repository and run makepkg
$ git clone https://gist.github.com/1aeea4c39d33ea515a5cf7957053d131.git
$ cd 1aeea4c39d33ea515a5cf7957053d131
$ makepkg -s
You can then install the generated package with pacman -U
# pacman -U spotify-tray*.tar.xz
Real installation will be implemented soon, for now you can follow below
No installation is required. You just need to clone the repository or download the zip file locally
$ git clone [email protected]:Kasama/SpotifyTray.git
$ cd SpotifyTray
and run the script with python
$ python3 spotify-tray.py
You can also use the provided .desktop
file to launch the script. The .desktop
should be in /usr/share/applications/
or ~/.local/share/applications
and the python script should be in your $PATH
- If you close spotify manually with this program running, it will hang useless and you won't be able to close it.
You can kill it with:
kill -9 `ps -aux | grep spotify-tray | head -1 | sed 's/\s\+/ /g' | cut -d' ' -f2`
This project is distributed under the MIT license.
Spotify is a trademark of Spotify Inc. It is not my work in any way and all its rights are reserved.