Herrie is a command line music player.
It needs Herrie SVN and
this patchinfoherrie
#!/bin/bash
HERRIE=`ps -e | grep [h]errie`
if [ "$HERRIE" ]
then
status=1
info=`qdbus info.herrie.Herrie /info/herrie/Herrie info.herrie.Herrie.getSong`
echo $status
echo -e ${info/" - "/\\n}
else
echo 0
fi
exit 0
music.tcl
...
"Herrie" [list GetSongHerrie TreatSongHerrie FillFrameLess] \
...
###########################################################
# ::music::TreatSongHerrie #
# ------------------------------------------------------- #
# Gets the current playing song in Herrie #
###########################################################
proc TreatSongHerrie {} {
#Grab the information asynchronously : thanks to Tjikkun
after 0 {::music::exec_async [list "sh" [file join $::music::musicpluginpath "infoherrie"]] }
}
###########################################################
# ::music::GetSongHerrie #
# ------------------------------------------------------- #
# Gets the current playing song in Herrie #
###########################################################
proc GetSongHerrie {} {
#Split the lines into a list and set the variables as appropriate
if { [catch {split $::music::actualsong "\n"} tmplst] } {
#actualsong isn't yet defined by asynchronous exec
return 0
}
#Get the information
set status [lindex $tmplst 0]
set artist [lindex $tmplst 1]
set song [lindex $tmplst 2]
if { $status == "0" } {
return 0
}
return [list $song $artist "" "" ""]
}
...