Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Get the current spotify status from cmd line

Project description

i3blocks screenshot


Requires OS level python dbus package:

λ sudo apt install python[3]-dbus


Install with pip:

λ pip install spotify-dbus-status


Enter spotify-dbus-status at the command line:

λ spotify-dbus-status
Flying Lotus - Zodiac Shit - Cosmogramma

The (–all) flag is implicit if nothing is specified:

λ spotify-dbus-status --all
Flying Lotus - Zodiac Shit - Cosmogramma

Get specific data:

λ spotify-dbus-status --album

λ spotify-dbus-status --artist
Flying Lotus

λ spotify-dbus-status --song
Zodiac Shit

Ordered output:

λ spotify-dbus-status --song --artist
Zodiac Shit - Flying Lotus

Custom seperator:

λ spotify-dbus-status --song --album --sep=", "
Zodiac Shit, Cosmogramma

Provide Template string:

λ spotify-dbus-status --template="[Artist: {artist} | Album: {album}]"
[Artist: Flying Lotus | Album: Cosmogramma]


λ spotify-dbus-status --format=json
{"album": "Cosmogramma", "artist": "Flying Lotus", "song": "Zodiac Shit"}

You can then parse by piping into jq:

λ spotify-dbus-status --format=json | jq -r '.artist + " - " + .song'
Flying Lotus - Zodiac Shit

i3blocks Integration

Add the following section (or similar) to you i3blocks.conf:

command=spotify-dbus-status --template="{artist} - {song}"

Contributor Thanks

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for spotify-dbus-status, version 0.1.6
Filename, size File type Python version Upload date Hashes
Filename, size spotify_dbus_status-0.1.6-py3-none-any.whl (3.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size spotify-dbus-status-0.1.6.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page