summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2015-09-01 04:56:33 +0200
committerRasmus Steinke <rasi@xssn.at>2015-09-01 04:56:33 +0200
commit37a70ff7158c4c8315efa3f509d25b209766876f (patch)
treeae35490248d4024fe1956598ae7a30bffd322707
parent6112217fc0e258d7c1a1bc32943cbec6bc6b6430 (diff)
downloadperl-app-clerk-37a70ff7158c4c8315efa3f509d25b209766876f.tar.gz
perl-app-clerk-37a70ff7158c4c8315efa3f509d25b209766876f.tar.xz
don't put playback check in a function
-rwxr-xr-xclerk16
1 files changed, 7 insertions, 9 deletions
diff --git a/clerk b/clerk
index aa66429..24c4a13 100755
--- a/clerk
+++ b/clerk
@@ -619,16 +619,14 @@ songs () {
| column -o ' ' -s $'\t' -t
}
-position () {
- if [[ -n $(mpc current) ]]; then
- current=$(mpc current -f '%position%')
- highlight="-u $(echo $(( $current +5 )))"
- else
- :
- fi
-}
+if [[ -n $(mpc current) ]]; then
+ current=$(mpc current -f '%position%')
+ highlight="-u $(echo $(( $current +5 )))"
+else
+ :
+fi
-TRACKDISPLAY=$(echo -e "< Return\n---\n> Load Playlist\n> Load RSS\n> Save Playlist\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}" -dmenu $(echo "${select}") "$(position)" -mesg "${HELP}" -p "Current Queue > ")
+TRACKDISPLAY=$(echo -e "< Return\n---\n> Load Playlist\n> Load RSS\n> Save Playlist\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}" -dmenu $(echo "${select}") $(echo "${highlight}") -mesg "${HELP}" -p "Current Queue > ")
tempval=$?
val=$tempval