made it general purpose
This commit is contained in:
parent
529fcc92e1
commit
9ef4bec1c7
10
weather
10
weather
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user