itunes support added

This commit is contained in:
Andrew Titmuss 2016-03-12 18:16:22 +11:00
parent 3ed4c43636
commit 1616bf1341

View file

@ -1139,6 +1139,10 @@ getsong () {
song=${song//'['*}
;;
esac
elif [ -n "$(ps aux | awk '!(/awk/ || /Helper/) && /iTunes/')" ]; then
song="$(osascript -e 'tell application "iTunes" to artist of current track as string & " - " name of current track as string')"
state="$(osascript -e 'tell application "iTunes" to player state as string')"
else
song="Unknown"
fi