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
|
|
@ -116,17 +116,21 @@ volume master {
|
|||
}
|
||||
static_string prev {
|
||||
format = ""
|
||||
on_click 1 = "exec --no-startup-id qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
|
||||
# on_click 1 = "exec --no-startup-id qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
|
||||
on_click 1 = "exec --no-startup-id ~/Bin/music.sh Previous"
|
||||
}
|
||||
static_string next {
|
||||
format = ""
|
||||
on_click 1 = "exec --no-startup-id qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
|
||||
# on_click 1 = "exec --no-startup-id qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
|
||||
on_click 1 = "exec --no-startup-id ~/Bin/music.sh Next"
|
||||
}
|
||||
external_script spotify {
|
||||
cache_timeout = 10
|
||||
format = "{output}"
|
||||
script_path = 'pidof spotify >/dev/null && 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") || (echo "")'
|
||||
on_click 1 = "exec --no-startup-id pidof spotify && qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
|
||||
script_path = "~/Bin/nowPlaying.sh"
|
||||
# script_path = 'pidof spotify >/dev/null && 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") || (echo "")'
|
||||
# on_click 1 = "exec --no-startup-id pidof spotify && qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
|
||||
on_click 1 = "exec --no-startup-id ~/Bin/music.sh PlayPause"
|
||||
}
|
||||
|
||||
# Tools
|
||||
|
|
Loading…
Reference in a new issue