Update weathermap script for i3blocks display
This commit is contained in:
		
							parent
							
								
									e1d466362d
								
							
						
					
					
						commit
						3233439d88
					
				@ -85,12 +85,14 @@ if [ -n "$current" ] && [ -n "$forecast" ]; then
 | 
				
			|||||||
    now=$(date +%s)
 | 
					    now=$(date +%s)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if [ "$sun_rise" -gt "$now" ]; then
 | 
					    if [ "$sun_rise" -gt "$now" ]; then
 | 
				
			||||||
        daytime="   $(get_duration "$((sun_rise-now))")" # Sun rise
 | 
					        daytime=" $(get_duration "$((sun_rise-now))")" # Sun rise
 | 
				
			||||||
    elif [ "$sun_set" -gt "$now" ]; then
 | 
					    elif [ "$sun_set" -gt "$now" ]; then
 | 
				
			||||||
        daytime="   $(get_duration "$((sun_set-now))")" # Sun set
 | 
					        daytime=" $(get_duration "$((sun_set-now))")" # Sun set
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        daytime="   $(get_duration "$((sun_rise-now))")" # Unknown
 | 
					        daytime=" $(get_duration "$((sun_rise-now))")" # Unknown
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    echo "$(get_icon "$current_icon")     $current_temp$SYMBOL  $trend    $(get_icon "$forecast_icon")     $forecast_temp$SYMBOL   $daytime"
 | 
					
 | 
				
			||||||
 | 
					    echo "$(get_icon "$current_icon") $current_temp$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp$SYMBOL $daytime"
 | 
				
			||||||
 | 
					    #echo "$(get_icon "$current_icon") $current_temp$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp$SYMBOL $daytime"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user