diff options
author | Rasmus Steinke <rasi@xssn.at> | 2014-08-04 00:48:35 +0200 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2014-08-04 00:48:35 +0200 |
commit | faf32b76a37d6f543c196677b739626942187786 (patch) | |
tree | 06fa946b2eabd36f2fe8295fcd7bc3f9aa2b34a4 /clerk | |
parent | 533793926ecea546636ec883cb019e598027a592 (diff) | |
download | perl-app-clerk-faf32b76a37d6f543c196677b739626942187786.tar.gz perl-app-clerk-faf32b76a37d6f543c196677b739626942187786.tar.xz |
make info prompt disappear on ESC
Diffstat (limited to 'clerk')
-rwxr-xr-x | clerk | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -201,7 +201,21 @@ infoPrompt () { } currentTag () { - mpc current --format "Artist: %artist%\nAlbum: %album%\nDate: %date%\nTrack: %track%\nTitle: %title%" | dmenu_t -p 'Tags > ' && dplayPrompt + 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---\n$(mpc current --format "Artist: %artist%\nAlbum: %album%\nDate: %date%\nTrack: %track%\nTitle: %title%")" | dmenu_t -p 'Tags > ') + + if [[ $seen = 0 ]] + then + exit + fi } dplayOptionsPrompt () { |