function conky_weather_icon(icao) local type type = conky_parse("${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ " .. icao .. " weather}") if (type == "drizzle") or (type == "rain") then return "${image ~/.icons/clima/rain.png -p 155,15 -s 50x50}" end if (type == "snow") or (type == "snow grains") then return "${image ~/.icons/clima/snow.png -p 155,15 -s 50x50}" end type = conky_parse("${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ " .. icao .. " cloud_cover}") if (type == "clear") or (type == "cloudy") then return "${image ~/.icons/clima/" .. type .. ".png -p 155,15 -s 50x50}" end if (type == "partly cloudy") then return "${image ~/.icons/clima/partlycloudy.png -p 155,15 -s 50x50}" end if (type == "overcast") then return "${image ~/.icons/clima/cloudy.png -p 155,15 -s 50x50}" end return "${image ~/.icons/clima/none.png -p 155,15 -s 50x50}" end