You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
606 B

#!/usr/bin/env sh
pidof svkbd-sxmo || svkbd-sxmo &
ZIP=$(
echo -e "
10025 - NYC
60007 - Chicago
94016 - San Francisco
97035 - Portland, OR
" |
awk 'NF' |
awk '{$1=$1};1' |
dmenu -fn Terminus-20 -i -c -l 10 -p "US Zipcode" |
awk -F " " '{print $1}'
)
pkill svkbd-sxmo
LATLON=$(cat /usr/share/sxmo/zipcodes_for_weather.csv | grep "^$ZIP")
LAT=$(echo $LATLON | cut -d, -f2 | tr -d ' ')
LON=$(echo $LATLON | cut -d, -f3 | tr -d ' ')
URL="https://forecast.weather.gov/MapClick.php?lat=${LAT}&lon=${LON}&unit=0&lg=english&FcstType=text&TextType=1"
st -f Monospace-20 -e w3m "$URL"