ansiweather

Weather in terminal, with ANSI colors and Unicode symbols
Log | Files | Refs | README | LICENSE

commit 62e91978e32eced7438871c3411088a00a3d0ff1
parent acb499fca39d32ed0b6d2f3f7aa65af9b09cfee8
Author: Ryan Delaney <ryan.delaney@gmail.com>
Date:   Wed,  3 Apr 2019 17:30:56 -0700

Respect freedesktop/XDG spec for configuration

Diffstat:
Mansiweather | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/ansiweather b/ansiweather @@ -20,7 +20,15 @@ LC_ALL=C; export LC_ALL -config_file=${ANSIWEATHERRC:-~/.ansiweatherrc} +if [ -n "$ANSIWEATHERRC" ] ; then + config_file="$ANSIWEATHERRC" +elif [ -s "$XDG_CONFIG_HOME"/ansiweather/config ] ; then + config_file="$XDG_CONFIG_HOME"/ansiweather/config +elif [ -s "$HOME"/ansiweather/config ] ; then + config_file="$HOME"/ansiweather/config +else + config_file=~/.ansiweatherrc +fi get_config() { ret=""