fixed weather icon formatting for no icon

This commit is contained in:
Dane Williams 2020-03-15 12:41:55 -07:00
parent 4362eaa8d7
commit d8d4ffc580

View file

@ -32,15 +32,15 @@ forecast_unicode()
forecast=$(weather_information | head -n 1) forecast=$(weather_information | head -n 1)
if [[ $forecast =~ 'Snow' ]]; then if [[ $forecast =~ 'Snow' ]]; then
echo '❄' echo '❄ '
elif [[ (($forecast =~ 'Rain') || ($forecast =~ 'Shower')) ]]; then elif [[ (($forecast =~ 'Rain') || ($forecast =~ 'Shower')) ]]; then
echo '☂' echo '☂ '
elif [[ (($forecast =~ 'Overcast') || ($forecast =~ 'Cloud')) ]]; then elif [[ (($forecast =~ 'Overcast') || ($forecast =~ 'Cloud')) ]]; then
echo '☁' echo '☁ '
elif [[ $forecast = 'NA' ]]; then elif [[ $forecast = 'NA' ]]; then
echo '' echo ''
else else
echo '☀' echo '☀ '
fi fi
@ -49,7 +49,7 @@ forecast_unicode()
display_weather() display_weather()
{ {
if [ $country = 'US' ]; then if [ $country = 'US' ]; then
echo " $(forecast_unicode) $(get_temp)°F" echo " $(forecast_unicode)$(get_temp)°F"
else else
echo '' echo ''
fi fi