dotfiles/hm/scripts/wttr

11 lines
272 B
Plaintext
Raw Permalink Normal View History

#!/usr/bin/env nix-shell
#! nix-shell -i bash --pure
#! nix-shell -p bash curl ncurses
2020-10-17 23:47:48 +02:00
# change Paris to your default location
2020-12-27 14:20:44 +01:00
request="v2.wttr.in/${1-Amsterdam}"
2020-10-17 23:47:48 +02:00
[ "$(tput cols)" -lt 125 ] && request+='?n'
curl -H "Accept-Language: ${LANG%_*}" --compressed "$request"