sxmo_weather: add wind direction
It's important for me to see wind direction in addition to speed. I understand most people probably don't care, so we should probably show this only if xinit sets WEATHER_WIND_DIR=1? But we can bikeshed that later, for now here's what I'm using on my phone right now. Signed-off-by: Serge Hallyn <serge@hallyn.com>
This commit is contained in:
parent
7d4b729b85
commit
16d77bcd86
1 changed files with 3 additions and 0 deletions
|
@ -80,9 +80,11 @@ printtables() {
|
|||
printarow "Temp" "$ROWHOURS" "$TEMP" "$INDENT"
|
||||
printarow "Rain" "$ROWHOURS" "$RAIN" "$INDENT"
|
||||
printarow "Wind" "$ROWHOURS" "$WIND" "$INDENT"
|
||||
printarow "Dirn" "$ROWHOURS" "$DIRECTION" "$INDENT"
|
||||
TIME="$(clearitemsfromrow "$ROWHOURS" "$TIME")"
|
||||
TEMP="$(clearitemsfromrow "$ROWHOURS" "$TEMP")"
|
||||
RAIN="$(clearitemsfromrow "$ROWHOURS" "$RAIN")"
|
||||
DIRECTION="$(clearitemsfromrow "$ROWHOURS" "$DIRECTION")"
|
||||
WIND="$(clearitemsfromrow "$ROWHOURS" "$WIND")"
|
||||
|
||||
echo "$TIME" | tr -d " " | tr -d '\n' | grep -Eq "^0" &&
|
||||
|
@ -104,6 +106,7 @@ getweathertexttable() {
|
|||
downloadweatherxml "$LAT" "$LON" 2>/dev/null
|
||||
TEMP="$(weatherdata "//temperature" "hourly")"
|
||||
RAIN="$(weatherdata "//probability-of-precipitation" ".")"
|
||||
DIRECTION="$(weatherdata "//direction" ".")"
|
||||
WIND="$(weatherdata "//wind-speed" ".")"
|
||||
#LOCATION="$(weatherdata "//location/description" ".")"
|
||||
TIME="$(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue