|
@ -9,51 +9,51 @@ WCODES=( |
|
|
["113"]="^c#ebcb8b^ " |
|
|
["113"]="^c#ebcb8b^ " |
|
|
["116"]="^c#ebcb8b^杖" |
|
|
["116"]="^c#ebcb8b^杖" |
|
|
["119"]="^c#ffffff^摒" |
|
|
["119"]="^c#ffffff^摒" |
|
|
["122"]="^c#ffffff^ " |
|
|
|
|
|
["143"]="^c#ffffff^ " |
|
|
|
|
|
["176"]="^c#81a1c1^ " |
|
|
|
|
|
["179"]="^c#81a1c1^ " |
|
|
|
|
|
["182"]="^c#81a1c1^ " |
|
|
|
|
|
["185"]="^c#81a1c1^ " |
|
|
|
|
|
["200"]="^c#81a1c1^ " |
|
|
|
|
|
["227"]="^c#ffffff^ " |
|
|
|
|
|
["230"]="^c#ffffff^ " |
|
|
|
|
|
["248"]="^c#ffffff^ " |
|
|
|
|
|
["260"]="^c#ffffff^ " |
|
|
|
|
|
["263"]="^c#81a1c1^ " |
|
|
|
|
|
["266"]="^c#81a1c1^ " |
|
|
|
|
|
["281"]="^c#81a1c1^ " |
|
|
|
|
|
["284"]="^c#81a1c1^ " |
|
|
|
|
|
["293"]="^c#81a1c1^ " |
|
|
|
|
|
["296"]="^c#81a1c1^ " |
|
|
|
|
|
["299"]="^c#81a1c1^ " |
|
|
|
|
|
["302"]="^c#81a1c1^ " |
|
|
|
|
|
["305"]="^c#81a1c1^ " |
|
|
|
|
|
["308"]="^c#81a1c1^ " |
|
|
|
|
|
["311"]="^c#81a1c1^ " |
|
|
|
|
|
["314"]="^c#81a1c1^ " |
|
|
|
|
|
["317"]="^c#81a1c1^ " |
|
|
|
|
|
["320"]="^c#ffffff^ " |
|
|
|
|
|
["323"]="^c#81a1c1^ " |
|
|
|
|
|
["326"]="^c#81a1c1^ " |
|
|
|
|
|
["329"]="^c#ffffff^ " |
|
|
|
|
|
["332"]="^c#ffffff^ " |
|
|
|
|
|
["335"]="^c#81a1c1^ " |
|
|
|
|
|
["338"]="^c#ffffff^ " |
|
|
|
|
|
["350"]="^c#81a1c1^ " |
|
|
|
|
|
["353"]="^c#81a1c1^ " |
|
|
|
|
|
["356"]="^c#81a1c1^ " |
|
|
|
|
|
["359"]="^c#81a1c1^ " |
|
|
|
|
|
["362"]="^c#81a1c1^ " |
|
|
|
|
|
["365"]="^c#81a1c1^ " |
|
|
|
|
|
["368"]="^c#81a1c1^ " |
|
|
|
|
|
["371"]="^c#81a1c1^ " |
|
|
|
|
|
["374"]="^c#81a1c1^ " |
|
|
|
|
|
["377"]="^c#81a1c1^ " |
|
|
|
|
|
["386"]="^c#81a1c1^ " |
|
|
|
|
|
["389"]="^c#81a1c1^ " |
|
|
|
|
|
["392"]="^c#81a1c1^ " |
|
|
|
|
|
["395"]="^c#81a1c1^ " |
|
|
|
|
|
|
|
|
["122"]="^c#ffffff^ " |
|
|
|
|
|
["143"]="^c#ffffff^ " |
|
|
|
|
|
["176"]="^c#81a1c1^ " |
|
|
|
|
|
["179"]="^c#81a1c1^ " |
|
|
|
|
|
["182"]="^c#81a1c1^ " |
|
|
|
|
|
["185"]="^c#81a1c1^ " |
|
|
|
|
|
["200"]="^c#81a1c1^ " |
|
|
|
|
|
["227"]="^c#ffffff^ " |
|
|
|
|
|
["230"]="^c#ffffff^ " |
|
|
|
|
|
["248"]="^c#ffffff^ " |
|
|
|
|
|
["260"]="^c#ffffff^ " |
|
|
|
|
|
["263"]="^c#81a1c1^ " |
|
|
|
|
|
["266"]="^c#81a1c1^ " |
|
|
|
|
|
["281"]="^c#81a1c1^ " |
|
|
|
|
|
["284"]="^c#81a1c1^ " |
|
|
|
|
|
["293"]="^c#81a1c1^ " |
|
|
|
|
|
["296"]="^c#81a1c1^ " |
|
|
|
|
|
["299"]="^c#81a1c1^ " |
|
|
|
|
|
["302"]="^c#81a1c1^ " |
|
|
|
|
|
["305"]="^c#81a1c1^ " |
|
|
|
|
|
["308"]="^c#81a1c1^ " |
|
|
|
|
|
["311"]="^c#81a1c1^ " |
|
|
|
|
|
["314"]="^c#81a1c1^ " |
|
|
|
|
|
["317"]="^c#81a1c1^ " |
|
|
|
|
|
["320"]="^c#ffffff^ " |
|
|
|
|
|
["323"]="^c#81a1c1^ " |
|
|
|
|
|
["326"]="^c#81a1c1^ " |
|
|
|
|
|
["329"]="^c#ffffff^ " |
|
|
|
|
|
["332"]="^c#ffffff^ " |
|
|
|
|
|
["335"]="^c#81a1c1^ " |
|
|
|
|
|
["338"]="^c#ffffff^ " |
|
|
|
|
|
["350"]="^c#81a1c1^ " |
|
|
|
|
|
["353"]="^c#81a1c1^ " |
|
|
|
|
|
["356"]="^c#81a1c1^ " |
|
|
|
|
|
["359"]="^c#81a1c1^ " |
|
|
|
|
|
["362"]="^c#81a1c1^ " |
|
|
|
|
|
["365"]="^c#81a1c1^ " |
|
|
|
|
|
["368"]="^c#81a1c1^ " |
|
|
|
|
|
["371"]="^c#81a1c1^ " |
|
|
|
|
|
["374"]="^c#81a1c1^ " |
|
|
|
|
|
["377"]="^c#81a1c1^ " |
|
|
|
|
|
["386"]="^c#81a1c1^ " |
|
|
|
|
|
["389"]="^c#81a1c1^ " |
|
|
|
|
|
["392"]="^c#81a1c1^ " |
|
|
|
|
|
["395"]="^c#81a1c1^ " |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
getforecast() { curl -sf "wttr.in/$LOCATION" > "$weatherreport" || exit 1 ;} |
|
|
getforecast() { curl -sf "wttr.in/$LOCATION" > "$weatherreport" || exit 1 ;} |
|
@ -67,11 +67,11 @@ showweather() { |
|
|
data=$(echo -ne $(echo $data | cut -d' ' -f 1-4)" ${WCODES[$(echo $data | cut -d' ' -f 5)]}") |
|
|
data=$(echo -ne $(echo $data | cut -d' ' -f 1-4)" ${WCODES[$(echo $data | cut -d' ' -f 5)]}") |
|
|
echo $data | awk -F' ' '{ |
|
|
echo $data | awk -F' ' '{ |
|
|
if ($4 > 30) |
|
|
if ($4 > 30) |
|
|
print "^c#ffffff^ ^d^" $4 "kh "$5 " ^d^" $1 "°C" |
|
|
|
|
|
|
|
|
print "^c#ffffff^ ^d^" $4 "kh / "$5 " ^d^ " $1 "°C" |
|
|
else if ($2 < $3) |
|
|
else if ($2 < $3) |
|
|
print "^c#ffffff^ ^d^" $3 "% "$5 " ^d^" $1 "°C" |
|
|
|
|
|
|
|
|
print "^c#ffffff^ ^d^" $3 "% / "$5 " ^d^ " $1 "°C" |
|
|
else |
|
|
else |
|
|
print "^c#81a1c1^ ^d^" $2 "% " $5 " ^d^" $1 "°C"}' |
|
|
|
|
|
|
|
|
print "^c#81a1c1^ ^d^" $2 "% / " $5 " ^d^ " $1 "°C"}' |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
case $BLOCK_BUTTON in |
|
|
case $BLOCK_BUTTON in |
|
|