From ff9ddcb63435ea76ebd9c8b44591f9dca43b7ddc Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Mon, 29 Jun 2020 10:18:07 -0500 Subject: [PATCH] Allow customization of zipcodes menu for sxmo_weather.sh via $SXMO_WEATHERZIPS --- scripts/appscripts/sxmo_weather.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/appscripts/sxmo_weather.sh b/scripts/appscripts/sxmo_weather.sh index 0a44398..c809d79 100755 --- a/scripts/appscripts/sxmo_weather.sh +++ b/scripts/appscripts/sxmo_weather.sh @@ -1,13 +1,14 @@ #!/usr/bin/env sh +[ -z "$SXMO_WEATHERZIPS" ] && SXMO_WEATHERZIPS=" + 10025 - NYC + 60007 - Chicago + 94016 - San Francisco + 97035 - Portland, OR +" pidof svkbd-sxmo || svkbd-sxmo & ZIP=$( - printf %b " - 10025 - NYC - 60007 - Chicago - 94016 - San Francisco - 97035 - Portland, OR - " | + printf %b "$SXMO_WEATHER_ZIPS" | awk 'NF' | awk '{$1=$1};1' | dmenu -fn Terminus-20 -i -c -l 10 -p "US Zipcode" |