ansiweather

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

commit 3c054f4dd2cac7b04d21b7f8df909b840644ada1
parent 11bc55a38e1b1e1c9a68a5f7e5bce211b822e466
Author: Frederic Cambus <fred@statdns.com>
Date:   Tue, 18 Oct 2016 13:58:53 +0200

Rename 'daylight' variable to 'show_daylight' for consistency with the newly introduced options

Diffstat:
Mansiweather | 10+++++-----
Mansiweatherrc.example | 2+-
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/ansiweather b/ansiweather @@ -58,7 +58,7 @@ do w) show_wind=${OPTARG};; h) show_humidity=${OPTARG};; p) show_pressure=${OPTARG};; - d) daylight=${OPTARG};; + d) show_daylight=${OPTARG};; esac done @@ -96,9 +96,6 @@ fi # Show forecast : How many days, example "5". "0" is standard output [ -z "$forecast" ] && forecast=$(get_config "forecast" || echo 0) -# Show daylight : "true" or "false" -[ -z "$daylight" ] && daylight=$(get_config "daylight" || echo false) - # Display ANSI colors : "true" or "false" [ -z "$ansi" ] && ansi=$(get_config "ansi" || echo true) @@ -114,6 +111,9 @@ fi # Show pressure : "true" or "false" [ -z "$show_pressure" ] && show_pressure=$(get_config "show_pressure" || echo true) +# Show daylight : "true" or "false" +[ -z "$show_daylight" ] && daylight=$(get_config "show_daylight" || echo false) + dateformat=$(get_config "dateformat" || echo "%a %b %d") timeformat=$(get_config "timeformat" || echo "%b %d %r") @@ -389,7 +389,7 @@ else output="$output$dashes$text $pressure_text $delimiter$data $pressure $pressure_unit " fi - if [ "$daylight" = true ] + if [ "$show_daylight" = true ] then output="$output$dashes$text $sunrise_text $delimiter$data $sunrise_time $dashes$text $sunset_text $delimiter$data $sunset_time " fi diff --git a/ansiweatherrc.example b/ansiweatherrc.example @@ -5,12 +5,12 @@ fetch_cmd:curl -sf location:Rzeszow,PL units:metric forecast:0 -daylight:false ansi:true symbols:true show_wind:true show_humidity:true show_pressure:true +show_daylight:false dateformat:%a %b %d timeformat:%b %d %r