summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2014-12-16 22:29:29 +0100
committerRasmus Steinke <rasi@xssn.at>2014-12-16 22:29:29 +0100
commitff9fb3820a8176d4f239226e34541f4b08a5e2e6 (patch)
tree74efda923b55ab59f87afc89b01d467fdb5dd332
parente18317ee949a8f2b82c8fa81d4c718fe99812a8a (diff)
downloadperl-app-clerk-ff9fb3820a8176d4f239226e34541f4b08a5e2e6.tar.gz
perl-app-clerk-ff9fb3820a8176d4f239226e34541f4b08a5e2e6.tar.xz
make current Queue highlight playing track
-rwxr-xr-xclerk10
1 files changed, 9 insertions, 1 deletions
diff --git a/clerk b/clerk
index 59ed51e..c24e0c8 100755
--- a/clerk
+++ b/clerk
@@ -481,6 +481,14 @@ resumePlaylist () {
}
dplayQueue () {
+ displayRofi () {
+ if [[ $backend == "rofi" ]]; then
+ dmenu_t -dmenu -p "Queue > " -l $(calc $(mpc current -f %position%) + 3)
+ elif [[ $backend == "dmenu" ]]; then
+ dmenu_t -p "Queue > "
+ fi
+ }
+
while read TRACKDISPLAY
do
TITLE=$(echo "$TRACKDISPLAY" | awk -F "$seperator" '{ print $3 }')
@@ -493,7 +501,7 @@ dplayQueue () {
else
mpc play $POS;
fi
- done < <(export seperator=$seperator; echo -e "0 Return to Main Menu\n---\nMode: Play\n---\n$(mpc playlist --format "%position%$seperator%artist%$seperator%title%")" | dmenu_t -p "Queue > ")
+ done < <(export seperator=$seperator; echo -e "0 Return to Main Menu\n---\nMode: Play\n---\n$(mpc playlist --format "%position%$seperator%artist%$seperator%title%")" | displayRofi)
exit
}