Commit | Line | Data |
---|---|---|
75d9f34d JC |
1 | #!/bin/sh |
2 | dbus-send --print-reply=literal --session \ | |
3 | --dest=org.mpris.MediaPlayer2.spotify \ | |
4 | /org/mpris/MediaPlayer2 \ | |
5 | org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus' \ | |
6 | | awk 'END { if (NR == 0) { exit 1 } } { exit $2 != "Playing" }' # 0 (success exit code) means playing |