From: Siraaj Khandkar Date: Fri, 10 Jan 2020 20:46:51 +0000 (-0500) Subject: Support passing weather location X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=87b05c1baf6a43c6c31bdbd06928ce16ec58620f;p=khome.git Support passing weather location --- diff --git a/home/lib/login_functions.sh b/home/lib/login_functions.sh index 5cb3709..4517697 100644 --- a/home/lib/login_functions.sh +++ b/home/lib/login_functions.sh @@ -312,7 +312,12 @@ note() { } weather() { - curl "http://wttr.in/$WEATHER_LOCATION" + local _weather_location + case "$1" in + '') _weather_location="$WEATHER_LOCATION";; + *) _weather_location="$1" + esac + curl "http://wttr.in/$_weather_location" } bt_devs_paired() {