diff --git a/nixos/i3/openweathermap-fullfeatured.sh b/nixos/i3/openweathermap-fullfeatured.sh index 9be08285..8cb9f945 100755 --- a/nixos/i3/openweathermap-fullfeatured.sh +++ b/nixos/i3/openweathermap-fullfeatured.sh @@ -86,7 +86,9 @@ if [ -n "$current" ] && [ -n "$forecast" ]; then forecast_temp=$(echo "$forecast" | $JQ ".list[].main.temp" | $CUT -d "." -f 1) forecast_feels=$(echo "$forecast" | $JQ ".list[].main.feels_like" | $CUT -d "." -f 1) forecast_icon=$(echo "$forecast" | $JQ -r ".list[].weather[0].icon") - - echo "$suburb, $city: $current_text $(get_icon "$current_icon") $current_temp($current_feels)$SYMBOL => $(get_icon "$forecast_icon") $forecast_temp($forecast_feels)$SYMBOL" - + if [ "$current_temp" -ne "$forecast_temp" ]; then + echo "$suburb, $city: $current_text $(get_icon "$current_icon") $current_temp($current_feels)$SYMBOL => $(get_icon "$forecast_icon") $forecast_temp($forecast_feels)$SYMBOL" + else + echo "$suburb, $city: $current_text $(get_icon "$current_icon") $current_temp($current_feels)$SYMBOL" + fi fi