Color stars in mpd-rate for clarity

This commit is contained in:
Henrik Lissner 2017-10-07 17:33:26 +02:00
parent 22bfd74974
commit 1f36083340
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -37,8 +37,8 @@ _clear_playlists() {
_display_stars() {
# Display new rating
stars=""
star_filled_icon="★"
star_empty_icon="☆"
star_filled_icon='\033[0;32m*\033[0m'
star_empty_icon='\033[0;30m*\033[0m'
for ((i=1;i<=5;i++)); do
if (( "$1" >= "$i" )); then
stars="${stars}${star_filled_icon}"
@ -46,7 +46,7 @@ _display_stars() {
stars="${stars}${star_empty_icon}"
fi
done
echo "$stars"
printf "$stars\n"
}