summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2015-09-01 01:10:34 +0200
committerRasmus Steinke <rasi@xssn.at>2015-09-01 01:10:34 +0200
commit9bfd3a9d5f2438bd29fb3590150810b3e3d8dd75 (patch)
tree1828e314a928bbbcb43ae8197f94c45e76bdca54
parent53c999693834dc7b41dfd5a0051f7704ef825802 (diff)
downloadperl-app-clerk-9bfd3a9d5f2438bd29fb3590150810b3e3d8dd75.tar.gz
perl-app-clerk-9bfd3a9d5f2438bd29fb3590150810b3e3d8dd75.tar.xz
highlight currently playing track
-rwxr-xr-xclerk7
1 files changed, 6 insertions, 1 deletions
diff --git a/clerk b/clerk
index 3e5e134..5fb4a6b 100755
--- a/clerk
+++ b/clerk
@@ -602,7 +602,12 @@ songs () {
| column -o ' ' -s $'\t' -t
}
- TRACKDISPLAY=$(echo -e "< Return\n---\n$(songs)" | rofi -kb-custom-1 "${delete}" -kb-custom-2 "${rate}" -kb-custom-3 "${save}" -kb-custom-4 "${crop}" -kb-custom-5 "${clear}" -kb-custom-6 "${load}" -kb-custom-7 "${rss}" -kb-custom-8 "${suspend}" -kb-custom-9 "${resume}" -dmenu $(echo "${select}") -mesg "${HELP}" -p "Current Queue > ")
+position () {
+ current=$(mpc current -f '%position%')
+ echo $(( $current +1 ))
+}
+
+TRACKDISPLAY=$(echo -e "< Return\n---\n$(songs)" | rofi -kb-custom-1 "${delete}" -kb-custom-2 "${rate}" -kb-custom-3 "${save}" -kb-custom-4 "${crop}" -kb-custom-5 "${clear}" -kb-custom-6 "${load}" -kb-custom-7 "${rss}" -kb-custom-8 "${suspend}" -kb-custom-9 "${resume}" -dmenu $(echo "${select}") -u $(position) -mesg "${HELP}" -p "Current Queue > ")
tempval=$?
val=$tempval