9 lines
323 B
Text
9 lines
323 B
Text
|
#!/bin/sh
|
||
|
|
||
|
player="spotifyd"
|
||
|
qdbus org.mpris.MediaPlayer2.$player /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata >/tmp/currentsong
|
||
|
artist=$(cat /tmp/currentsong | grep "xesam:artist" | sed 's/.*artist: //')
|
||
|
title=$(cat /tmp/currentsong | grep "xesam:title" | sed 's/.*title: //')
|
||
|
|
||
|
echo ${artist} - ${title}
|