diff options
author | Rasmus Steinke <rasi@xssn.at> | 2014-08-04 19:57:00 +0200 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2014-08-04 19:57:00 +0200 |
commit | 4ea0d61f7f797d21ea8ac6dc12ab8144c4b0efb1 (patch) | |
tree | a482c29f21f9cd80156d2b6f3a342674cb000268 /clerk | |
parent | c7f501d708b35615c9e31833780dbd96e3ef6d67 (diff) | |
download | perl-app-clerk-4ea0d61f7f797d21ea8ac6dc12ab8144c4b0efb1.tar.gz perl-app-clerk-4ea0d61f7f797d21ea8ac6dc12ab8144c4b0efb1.tar.xz |
add readcomments support for tag view
Diffstat (limited to 'clerk')
-rwxr-xr-x | clerk | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -207,10 +207,12 @@ currentTag () { seen=1 if [[ "$line" == "0 Return to Main Menu" ]]; then dplayPrompt + elif [[ "$line" == "Show all Tags" ]]; then + readComments elif [[ "$line" == "" ]]; then return fi - done < <(echo -e "0 Return to Main Menu\n---\n$(mpc current --format "Artist: %artist%\nAlbum: %album%\nDate: %date%\nTrack: %track%\nTitle: %title%")" | dmenu_t -p 'Tags > ') + done < <(echo -e "0 Return to Main Menu\n---\nShow all Tags\n---\n$(mpc current --format "Artist: %artist%\nAlbum: %album%\nDate: %date%\nTrack: %track%\nTitle: %title%")" | dmenu_t -p 'Tags > ') if [[ $seen = 0 ]] then @@ -218,6 +220,25 @@ currentTag () { fi } +readComments () { + declare -i seen=0 + while read line + do + seen=1 + if [[ "$line" == "0 Return to Main Menu" ]]; then + dplayPrompt + elif [[ "$line" == "" ]]; then + return + fi + done < <(echo -e "0 Return to Main Menu\n---\nShow all Tags\n---\n$(mppc readcomments)" | dmenu_t -p 'Tags > ') + + if [[ $seen = 0 ]] + then + exit + fi +} + + dplayOptionsPrompt () { export status="$(mpc status)" single=$(echo "$status" | tail -1 | awk -F ':' '{ print $5 }' | cut -d ' ' -f 2) |