diff options
author | Rasmus Steinke <rasi@xssn.at> | 2014-08-03 15:17:43 +0200 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2014-08-03 15:17:43 +0200 |
commit | f12e3bd06daf027bb981a76d8636b7666696ee22 (patch) | |
tree | a900ba52ee52a6c6157b2850e39b46f879cfaeef /clerk | |
parent | acc0462d40e588d6b2239c3736ebe4e09b86f9ef (diff) | |
download | perl-app-clerk-f12e3bd06daf027bb981a76d8636b7666696ee22.tar.gz perl-app-clerk-f12e3bd06daf027bb981a76d8636b7666696ee22.tar.xz |
date function fix for ESC
Diffstat (limited to 'clerk')
-rwxr-xr-x | clerk | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -45,7 +45,9 @@ updateCache() { } dplayPrompt () { - menu=("1 Play random Album" + menu=("0 Exit Clerk" + "---" + "1 Play random Album" "2 Play random Songs" "---" "3 Current Artist" @@ -71,6 +73,7 @@ dplayPrompt () { 7*) ratingPrompt ;; 8*) infoPrompt ;; 9*) playbackPrompt ;; + 0*) exit ;; *) exit esac } @@ -703,8 +706,10 @@ browseDate() { } browseDateAdd() { + declare -i seen=0 while read select do + seen=1 if [[ "$select" == "0 Return to Date Menu" ]] then browseDate else @@ -721,11 +726,18 @@ browseDateAdd() { fi fi done < <(echo -e "0 Return to Date Menu\n---\nAdding Mode: Add\n---\nAdd All\nReplace All\n---\n$(mppc find date "$date" --format "{$mpd_artist} $seperator {album}" | uniq)" | dmenu_t -dmenu -p "Select Album > ") + + if [[ $seen = 0 ]] + then + exit + fi } browseDateInsert() { + declare -i seen=0 while read select do + seen=1 if [[ "$select" == "0 Return to Date Menu" ]] then browseDate else @@ -742,8 +754,15 @@ browseDateInsert() { fi fi done < <(echo -e "0 Return to Date Menu\n---\nAdding Mode: Insert\n---\nAdd All\nReplace All\n---\n$(mppc find date "$date" --format "{$mpd_artist} $seperator {album}" | uniq)" | dmenu_t -dmenu -p "Select Album > ") + + if [[ $seen = 0 ]] + then + exit + fi + } + browseDateReplace() { while read select do |