[CONKY] Fix the display and add italian language

This commit is contained in:
Gregory Trolliet 2020-05-18 08:41:50 +02:00
parent fc3fa44d05
commit 2799bf6b93

View file

@ -255,10 +255,14 @@ language+=([en]="English");
language+=([fr]="Français");
language+=([no]="Norsk");
language+=([se]="Svenska");
language+=([it]="Italiano");
if cmus-remote -Q &>/dev/null ; then
COMMENT=$( cmus-remote -Q | grep "tag comment " | cut -d " " -f 3- )
LANGUAGE=$( echo $COMMENT | sed 's/.*lang:\(.\{2\}\).*/\1/')
if [ "$LANGUAGE" = "$COMMENT" ]; then
LANGUAGE="";
fi
COUNTRY=$( echo $COMMENT | sed 's/.*country:\(.\{2\}\).*/\1/')
if [ ! -z "$LANGUAGE" ] && [ ! -z "$COUNTRY" ]; then
echo "${language[$LANGUAGE]}, ${country[$COUNTRY]}"