#!/usr/bin/env fish set lat $argv[1] set lon $argv[2] set token '9755405ea54edcefb75bcc61cc9c3c60' #if test ! -z $argv[3] # set_color green # echo "Weather at $argv[3]" # set_color normal #end #curl -s "https://api.openweathermap.org/data/2.5/forecast?lat=$lat&lon=$lon&appid=$token" | jq -r '.list[] | "\(.dt_txt[0:16]) \(.weather[0].description) at \(.main.temp - 273.15|round)°C"' curl -s "https://api.openweathermap.org/data/2.5/forecast?lat=$lat&lon=$lon&appid=$token" | jq -r '.list[] | .main.temp - 273.15|round'