Skip to content

Instantly share code, notes, and snippets.

@alex179ohm
Last active November 17, 2018 11:58
Show Gist options
  • Save alex179ohm/3696d50aa37109373b79 to your computer and use it in GitHub Desktop.
Save alex179ohm/3696d50aa37109373b79 to your computer and use it in GitHub Desktop.
Wttr.in light theme readable on light terminal colors.
_wttr() {
curl -s wttr.in/$1 | sed -e 's/38;5/1;38;5/g' -e 's/226m/220m/g'
if [ $? -ne 0 ]
then
printf "\033[1;38;5;196Something go wrong.\033[0m\n"
return 1
fi
}
alias wttr='_wttr'
@alex179ohm
Copy link
Author

usage:

$ wttr NewYork

or

$ wttr Moon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment