diff options
author | Rasmus Steinke <rasi@xssn.at> | 2014-08-04 00:21:37 +0200 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2014-08-04 00:21:37 +0200 |
commit | f01c902f3fc6590eabc278f11e07084ecd1e912c (patch) | |
tree | 3439c36223ab81b047647d581154405914ddbdcf /clerk | |
parent | 693e603016a5ce7e3d7d11a8fc58bb83f8a0eb58 (diff) | |
download | perl-app-clerk-f01c902f3fc6590eabc278f11e07084ecd1e912c.tar.gz perl-app-clerk-f01c902f3fc6590eabc278f11e07084ecd1e912c.tar.xz |
added option to change album max. rating
Diffstat (limited to 'clerk')
-rwxr-xr-x | clerk | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -246,7 +246,8 @@ mpds_check="$(ssh $ssh_host -q -t 'bash -c "pgrep mpdscribble"')" "---" "7 Set Crossfade $(mpc crossfade | cut -d ':' -f2)" "8 Manage Outputs" - "9 Number of Random Songs: $(echo $value)") + "9 Number of Random Songs: $(echo $value)" + "r Maximum Albums Rating: $(echo $maxratings)") prompt() { printf "%s\n" "$@" | dmenu_t -p "MPD Options: > " @@ -262,6 +263,7 @@ mpds_check="$(ssh $ssh_host -q -t 'bash -c "pgrep mpdscribble"')" 7*) crossfadePrompt ;; 8*) outputPrompt ;; 9*) optionRandomPrompt ;; + r*) optionsRatingPrompt ;; 0*) dplayPrompt ;; *) exit esac @@ -274,6 +276,12 @@ optionRandomPrompt() { dplayOptionsPrompt } +optionsRatingPrompt() { + number="$(echo " " | dmenu_t -p 'Set Maximum Rating for Albums: > ')" + sed -i "s/maxratings=.*/maxratings="$number"/" $HOME/.config/clerk/config + export maxratings="$number" + dplayOptionsPrompt +} crossfadePrompt () { |