I’m happy using Fish for my shell. One thing I’d not gotten around to after switching is finding a good directory jumper. The original z doesn’t work well with Fish. I used to use fasd and autojump, but thought I’d look around for something new.
Fish shell welcome message showing weather conditions
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.comjq=/opt/homebrew/bin/jq
# Save the response to temporary file# TODO: shouldn't this just be a variable or something instead?weatherfile=`mktemp` curl -s "https://api.weatherapi.com/v1/forecast.json?key=[SNIP]&q=49301&days=1&aqi=no&alerts=no" > $weatherfilenow=`${jq} -r .current.condition.text ${weatherfile}`temp=`${jq} -r .current.temp_f ${weatherfile}`condition=`${jq} -r .forecast.forecastday[0].day.condition.text ${weatherfile}`high=`${jq} -r .forecast.forecastday[0].day.maxtemp_f ${weatherfile}`low=`${jq} -r .forecast.forecastday[0].day.mintemp_f ${weatherfile}`echo"${now}${temp} | Low ${low}, High ${high}"
Right now, this returns: Light snow 21.9 | Low 20.1, High 26.4