made it general purpose

This commit is contained in:
spinach 2023-02-27 10:02:00 -05:00
parent 529fcc92e1
commit 9ef4bec1c7

10
weather
View File

@ -274,18 +274,14 @@ display_forecast() {
echo "Location not found!"
exit 1
fi
echo "Loading weather..."
if [[ -n "$PRETTY" ]] ; then
# nerdfont
curl -fsSL "https://v2d.wttr.in/${LAT},${LON}?F" -o /tmp/weather
curl -fsSL "https://v2d.wttr.in/${LAT},${LON}?F" | less
else
curl -fsSL "https://wttr.in/${LAT},${LON}?F" -o /tmp/weather
curl -fsSL "https://wttr.in/${LAT},${LON}?F" | less
fi
# wil be sent to scratchpad in i3
st -n weather -e less -Srf /tmp/weather &
i3-msg "[instance=weather] scratchpad show" >/dev/null
exit 0
}