Added missing files for media keys

This commit is contained in:
Damien Broqua 2020-08-09 23:43:12 +02:00
parent faafbb657b
commit 87f52f757a
2 changed files with 18 additions and 8 deletions

18
Bin/music.sh Executable file
View file

@ -0,0 +1,18 @@
#! /bin/bash
service=""
spotifyIsUp=`pidof spotify`
rhythmboxIsUp=`pidof rhythmbox`
if [ "${spotifyIsUp}" ]; then
echo "Spotify is up!"
service="spotify"
elif [ "${rhythmboxIsUp}" ]; then
echo "Rhythmbox is up!"
service="rhythmbox"
else
echo "All down…"
exit -1
fi
qdbus org.mpris.MediaPlayer2.${service} /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.$1