I'm trying to get the current track playing in spotify into my dwm status bar. I got to the point where I get the information with this command.
enter code heredbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'
The result is this:
method return sender=:1.0 -> dest=:1.15 reply_serial=2
variant array [
dict entry(
string "mpris:artUrl"
variant string "http://open.spotify.com/thumb/45656b0961cba1598d127c3404ad276acb8e961b"
)
dict entry(
string "mpris:length"
variant uint64 308000000
)
dict entry(
string "mpris:trackid"
variant string "spotify:track:7oGXMMrB78C5tQhumQ2jfZ"
)
dict entry(
string "xesam:album"
variant string "Chopin"
)
dict entry(
string "xesam:artist"
variant array [
string "Frederic Chopin"
]
)
dict entry(
string "xesam:autoRating"
variant double 0.57
)
dict entry(
string "xesam:contentCreated"
variant string "2009-01-01T00:00:00"
)
dict entry(
string "xesam:discNumber"
variant int32 0
)
dict entry(
string "xesam:title"
variant string "Waltz No. 1 in E flat Major, Op. 18"
)
dict entry(
string "xesam:trackNumber"
variant int32 8
)
dict entry(
string "xesam:url"
variant string "spotify:track:7oGXMMrB78C5tQhumQ2jfZ"
)
]
So my question is how I get the dict entry "xesam:artist" and "xesam:title" out of this result so I can put it in my status bar?