Added support for Amarok

This commit is contained in:
Muhammad Herdiansyah 2016-09-07 23:02:45 +07:00
parent fb4638f1af
commit 7a7e7aeb1f
1 changed files with 5 additions and 0 deletions

View File

@ -1237,6 +1237,11 @@ getsong() {
song="$artist - $title"
state="$(banshee --query-current-state | awk -F':' '{print $2}')"
elif [ -n "$(ps x | awk '!(/awk/) && /amarok/')" ]; then
artist="$(qdbus org.kde.amarok /Player GetMetadata | awk -F':' '/^artist/ {print $2}')"
title="$(qdbus org.kde.amarok /Player GetMetadata | awk -F':' '/title/ {print $2}')"
song="$artist - $title"
else
song="Not Playing"
fi