ansiweather

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

commit 8bccbaf323434a6d10ec45be0c476ad20f88e8a1
parent bf53aee2057942f421983637b78efd6dd4893eef
Author: Frederic Cambus <fred@statdns.com>
Date:   Tue, 13 Aug 2019 17:26:52 +0200

Merge pull request #121 from rpdelaney/xdg-spec

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"/.config/ansiweather/config ] ; then + config_file="$HOME"/.config/ansiweather/config +else + config_file=~/.ansiweatherrc +fi get_config() { ret=""