Updated multimedia functions
This commit is contained in:
parent
b63236470c
commit
208b4a7c44
2 changed files with 20 additions and 4 deletions
12
Bin/nowPlaying.sh
Executable file
12
Bin/nowPlaying.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#! /bin/bash
|
||||
|
||||
spotifyIsUp=`pidof spotify`
|
||||
rhythmboxIsUp=`pidof rhythmbox`
|
||||
|
||||
if [ "${spotifyIsUp}" ]; then
|
||||
echo $(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata | grep "^xesam:\(title\|artist\):" | grep -o " .*" | column | sed "s/\t\+/:/g")
|
||||
elif [ "${rhythmboxIsUp}" ]; then
|
||||
echo $(rhythmbox-client --print-playing-format "%ta - %tt (%at)")
|
||||
else
|
||||
echo ""
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue