/rofi-spotify

A spotify application with rofi as frontend

Primary LanguagePythonMIT LicenseMIT

rofi-spotify

A spotify application with rofi as frontend

Installing

pip install -r requirements.txt --user

or

virtualenv -p python3 virtualenv
pip install -r requirements.txt

Setup

  1. Go to the Spotify dashboard
  2. Click Create a Client ID and create an app
  3. Now click Edit Settings
  4. Add http://localhost:8080/callback to the Redirect URIs
  5. You are now ready to authenticate with Spotify!
  6. Go back to the terminal
  7. Run ./rofi-spotify.py --setup
  8. Enter your Client ID
  9. Enter your Client Secret
  10. Enter your Redirect URI
  11. You will be redirected to an official Spotify webpage to ask you for permissions.
  12. Enter the localhost url from the browser
  13. Ready to use :)

Your config will be stored under ~/.config/rofi-spotify/config

Usage

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.

Keyboard shortcuts

Shortcut Action
Alt+Enter Play/Pause
Alt+Left Previous Song
Alt+Right Next Song