Adding weather to my Fish welcome message

For some reason, I always want to know the weather conditions. I barely go outdoors, but I still like to know what’s happening. I have a few shell scripts that kick out some version of the weather. Here’s the one I use most:
#!/bin/sh
# Jack Baty, 2023 (https://baty.net)
# Grab and parse weather info using WeatherAPI.com
jq=/opt/homebrew/bin/jq
# Save the response to temporary file
# TODO: shouldn't this just be a variable or something instead?
weatherfile=
now=
temp=
condition=
high=
low=
Right now, this returns: Light snow 21.9 | Low 20.1, High 26.4
I recently went back to using Fish shell. Fish has a function called fish_greeting that returns a generic welcome message with each new shell. I changed it so that it shows the time and weather. My ~/.config/fish/functions/fish_greeting.fish looks like this:
)
Neat, huh? Normally the weatherapi.com API is fairly responsive, but I can see this being a problem when it’s laggy. I don’t open that many new terminal windows, so it’s fine for now.