From b10f8116c8b4cbf72b4caaaf2291572260fec270 Mon Sep 17 00:00:00 2001 From: mtp13 Date: Fri, 8 May 2026 07:24:26 -0500 Subject: [PATCH] fix(weather): Use local units for temperature and wind (#5660) * fix(weather): Use local units for temperature and wind Remove the metric-to-imperial temperature conversion and display temperature and wind values as returned for the current locale. * Don't need this comment --------- Co-authored-by: David Heinemeier Hansson --- bin/omarchy-weather-status | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/bin/omarchy-weather-status b/bin/omarchy-weather-status index e3e5b6bb..b2552b82 100755 --- a/bin/omarchy-weather-status +++ b/bin/omarchy-weather-status @@ -2,7 +2,7 @@ # omarchy:summary=Returns a formatted weather status string with temperature and wind speed. -weather=$(curl -fsS --max-time 4 "https://wttr.in?m&format=%l|%t|%w" 2>/dev/null | tr -d '\n') +weather=$(curl -fsS --max-time 4 "https://wttr.in?format=%l|%t|%w" 2>/dev/null | tr -d '\n') if [[ -z $weather ]]; then echo "Weather unavailable" @@ -12,15 +12,6 @@ fi IFS='|' read -r place temperature wind <<< "$weather" place=${place%%,*} place=${place^} -format_temperature() { - local celsius=${1#+} - celsius=${celsius//°/} - celsius=${celsius%C} - - echo "${celsius}°c / $((celsius * 9 / 5 + 32))°f" -} - -temperature=$(format_temperature "$temperature") -wind=${wind//km\// km/} +temperature=${temperature#+} echo "$(omarchy-weather-icon) $place · Temp $temperature · Wind $wind"