A spotify application with rofi as frontend
pip install -r requirements.txt --user
or
virtualenv -p python3 virtualenv
pip install -r requirements.txt
- Go to the Spotify dashboard
- Click
Create a Client ID
and create an app - Now click
Edit Settings
- Add
http://localhost:8080/callback
to the Redirect URIs - You are now ready to authenticate with Spotify!
- Go back to the terminal
- Run
./rofi-spotify.py --setup
- Enter your
Client ID
- Enter your
Client Secret
- Enter your
Redirect URI
- You will be redirected to an official Spotify webpage to ask you for permissions.
- Enter the localhost url from the browser
- Ready to use :)
Your config will be stored under ~/.config/rofi-spotify/config
Create a keybinding which launches the script. To be able to play song you will need a running spotify client (e.g. spotifyd)
By default:
- the script will give notifications (with notify-send) when starting a playlist/song
- choose the first available active spotify device
To disable notification you can use the flag --no-notify
.
To select a default device which should get used run the script once with --set-default-device
. This will give you a rofi prompt to select a currently available device and will save that in the config file for the future.
Shortcut | Action |
---|---|
Alt+Enter | Play/Pause |
Alt+Left | Previous Song |
Alt+Right | Next Song |