summaryrefslogtreecommitdiffstats
path: root/clerk
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2015-09-04 04:25:23 +0200
committerRasmus Steinke <rasi@xssn.at>2015-09-04 04:25:23 +0200
commita608913f0eae6828ccc9a49f0a42bfe38f7c593e (patch)
tree12778c16f327727048a73fede42f267e6929d501 /clerk
parent4ed4e4d6d0ceb27b444d66d3a26d8580dd0fed01 (diff)
downloadperl-app-clerk-a608913f0eae6828ccc9a49f0a42bfe38f7c593e.tar.gz
perl-app-clerk-a608913f0eae6828ccc9a49f0a42bfe38f7c593e.tar.xz
add hotkey to reload playlist
Diffstat (limited to 'clerk')
-rwxr-xr-xclerk37
1 files changed, 30 insertions, 7 deletions
diff --git a/clerk b/clerk
index 98cee1e..a10cfff 100755
--- a/clerk
+++ b/clerk
@@ -578,14 +578,34 @@ songs () {
| column -o ' ' -s $'\t' -t
}
-if [[ -n $(mpc current) ]]; then
- current=$(mpc current -f '%position%')
- highlight="-u $(echo $(( $current +1 )))"
-else
- :
-fi
+ if [[ -n $(mpc current) ]]; then
+ current=$(mpc current -f '%position%')
+ highlight="-u $(echo $(( $current +1 )))"
+ else
+ :
+ fi
-TRACKDISPLAY=$(echo -e "< Return\n---\n$(songs)" | dmenu_t -kb-custom-1 "${delete}" -kb-custom-2 "${rate}" -kb-custom-4 "${crop}" -kb-custom-5 "${clear}" -kb-custom-6 "${moveup}" -kb-custom-7 "${movedown}" -kb-custom-8 "${suspend}" -kb-custom-9 "${resume}" -kb-custom-10 "${albumlist}" -kb-custom-11 "${tracklist}" -kb-custom-12 ${goalbum} -kb-custom-13 ${gotrack} -kb-custom-14 ${load} -kb-custom-15 ${loadrss} -kb-custom-16 ${save} -dmenu $(echo "${select}") $(echo "${highlight}") -mesg "${HELP}" -p "Current Queue > ")
+ TRACKDISPLAY=$(echo -e "< Return\n---\n$(songs)" \
+ | dmenu_t \
+ -kb-custom-1 "${delete}" \
+ -kb-custom-2 "${rate}" \
+ -kb-custom-4 "${crop}" \
+ -kb-custom-5 "${clear}" \
+ -kb-custom-6 "${moveup}" \
+ -kb-custom-7 "${movedown}" \
+ -kb-custom-8 "${suspend}" \
+ -kb-custom-9 "${resume}" \
+ -kb-custom-10 "${albumlist}" \
+ -kb-custom-11 "${tracklist}" \
+ -kb-custom-12 ${goalbum} \
+ -kb-custom-13 ${gotrack} \
+ -kb-custom-14 ${load} \
+ -kb-custom-15 ${loadrss} \
+ -kb-custom-16 ${save} \
+ -kb-custom-17 ${reload} \
+ -dmenu $(echo "${select}") $(echo "${highlight}") \
+ -mesg "${HELP}" \
+ -p "Current Queue > ")
tempval=$?
val=$tempval
@@ -614,6 +634,9 @@ TRACKDISPLAY=$(echo -e "< Return\n---\n$(songs)" | dmenu_t -kb-custom-1 "${delet
elif [[ $val -eq 25 ]]; then
dplayQueueSave
+ elif [[ $val -eq 26 ]]; then
+ dplayQueue
+
elif [[ $val -eq 21 ]]; then
temp=$(mpc playlist --format '%position%\t%file%' | grep "^${POS}" | grep "${ARTIST}" | awk -F '\t' '{ print $2 }')
info=$(mpc --format '%albumartist%\t%album%\t%date%\t%track%\t%title%' search filename "${temp}")