Files
arthur-os/bin/omarchy-weather-status
T
b10f8116c8 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 <david@hey.com>
2026-05-08 14:24:26 +02:00

18 lines
469 B
Bash
Executable File

#!/bin/bash
# omarchy:summary=Returns a formatted weather status string with temperature and wind speed.
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"
exit 1
fi
IFS='|' read -r place temperature wind <<< "$weather"
place=${place%%,*}
place=${place^}
temperature=${temperature#+}
echo "$(omarchy-weather-icon) $place · Temp $temperature · Wind $wind"