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_expiration
 | 
			
		||||
 | 
			
		||||
    ST="$STATE"
 | 
			
		||||
    if [[ $(wc -c <<<"$STATE") -gt 4 ]] ; then
 | 
			
		||||
        ST=$(printf '%s.' $(head -c 4 <<<"$STATE"))
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # trimming state
 | 
			
		||||
    if [[ "$PRETTY" = true ]] ; then
 | 
			
		||||
        # print with NF icons
 | 
			
		||||
@ -65,10 +60,10 @@ print_weather() {
 | 
			
		||||
            temp_icon=$(echo -e '\ufa04')
 | 
			
		||||
        fi
 | 
			
		||||
        # 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
 | 
			
		||||
        # 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
 | 
			
		||||
 | 
			
		||||
    # save before exiting
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user