ansiweather

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

commit 31c2ea987c7837a350b2f1974d29cef325172207
parent d75816822e222d47c3b41f78fbd95df91fdcfcc6
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Wed, 30 Oct 2013 23:37:13 +0100

Making text labels customizable (Closes #8)

Diffstat:
Mansiweather | 13+++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/ansiweather b/ansiweather @@ -6,7 +6,7 @@ # https://github.com/fcambus/ansiweather # # # # Created: 2013/08/29 # -# Last Updated: 2013/10/28 # +# Last Updated: 2013/10/30 # # # # AnsiWeather is released under the BSD 3-Clause license. # # See LICENSE file for details. # @@ -66,6 +66,15 @@ dashes=$(get_config "dashes" || echo "\033[34m-") +###[ Text Labels ]############################################################# + +greeting_text=$(get_config "greeting" || echo "Current weather in") +wind_text=$(get_config "wind" || echo "Wind") +humidity_text=$(get_config "humidity" || echo "Humidity") +pressure_text=$(get_config "pressure" || echo "Pressure") + + + ###[ Unicode Symbols for icons ]############################################### sun=$(get_config "sun" || echo "\033[33;1m\xe2\x98\x80") @@ -186,4 +195,4 @@ fi ###[ Display current Weather ]################################################# -echo -e "$background$text Current weather in $city $delimiter$data $temperature $scale $icon$dashes$text Wind $delimiter$data $wind $speed_unit $direction $dashes$text Humidity $delimiter$data $humidity % $dashes$text Pressure $delimiter$data $pressure $pressureUnit \033[0m" +echo -e "$background$text $greeting_text $city $delimiter$data $temperature $scale $icon$dashes$text $wind_text $delimiter$data $wind $speed_unit $direction $dashes$text $humidity_text $delimiter$data $humidity % $dashes$text $pressure_text $delimiter$data $pressure $pressureUnit \033[0m"