bug fixes
This commit is contained in:
parent
bc31044771
commit
b0e8c10f0e
@ -48,11 +48,6 @@ print_weather() {
|
|||||||
# check to see if it is expired
|
# check to see if it is expired
|
||||||
check_expiration
|
check_expiration
|
||||||
|
|
||||||
ST="$STATE"
|
|
||||||
if [[ $(wc -c <<<"$STATE") -gt 4 ]] ; then
|
|
||||||
ST=$(printf '%s.' $(head -c 4 <<<"$STATE"))
|
|
||||||
fi
|
|
||||||
|
|
||||||
# trimming state
|
# trimming state
|
||||||
if [[ "$PRETTY" = true ]] ; then
|
if [[ "$PRETTY" = true ]] ; then
|
||||||
# print with NF icons
|
# print with NF icons
|
||||||
@ -65,10 +60,10 @@ print_weather() {
|
|||||||
temp_icon=$(echo -e '\ufa04')
|
temp_icon=$(echo -e '\ufa04')
|
||||||
fi
|
fi
|
||||||
# printing
|
# printing
|
||||||
printf '%s %.1f%s%d\ue373 in %s, %s\n' $icon $TEMPERATURE "$temp_icon" "$HUMIDITY" "$CITY" "$ST"
|
printf '%s %.1f%s%d\ue373 in %s, %s\n' $icon $TEMPERATURE "$temp_icon" "$HUMIDITY" "$CITY" "$STATE"
|
||||||
else
|
else
|
||||||
# default printing
|
# default printing
|
||||||
printf "%.1f *$UNIT %d%% Humidity in %s, %s\n" $TEMPERATURE $HUMIDITY "$CITY" "$ST"
|
printf "%.1f *$UNIT %d%% Humidity in %s, %s\n" $TEMPERATURE $HUMIDITY "$CITY" "$STATE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# save before exiting
|
# save before exiting
|
||||||
|
Loading…
x
Reference in New Issue
Block a user