[awesome] Defaulting to daytime icons

Defaulting to daytime icons until is_daytime functionality is fixed
This commit is contained in:
Adam Cooper 2025-03-10 13:45:35 -04:00
parent 4253f0b1e8
commit 06360ecf20
9 changed files with 14 additions and 14 deletions

View file

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View file

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 3 KiB

View file

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View file

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View file

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View file

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View file

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View file

@ -122,7 +122,7 @@ local function factory(args)
if not err and type(sun_position) == "table" then
local sunrise = tonumber(sun_position["daily"]["data"][1]["sunriseTime"])
local sunset = tonumber(sun_position["daily"]["data"][1]["sunsetTime"])
local icon = sun_position["daily"]["icon"]
icon = sun_position["daily"]["icon"]
local loc_now = os.time()
if sunrise <= loc_now and loc_now <= sunset then
@ -146,30 +146,30 @@ local function factory(args)
print("****DEBUG**** weather_now: ", weather_now["currently"]["temperature"])
if not err and type(weather_now) == "table" then
--[[
is_daytime, icon, err = weather.is_daytime()
print("****DEBUG**** is_daytime, icon, err: ", is_daytime, icon, err)
if not err and type(icon) == "string" then
if is_daytime then
icon = string.gsub(weather_now["currently"]["icon"], "n", "d")
print("****DEBUG**** weather-now-icon: ", weather_now["currently"]["icon"])
if
not err --[[and type(icon) == "string"--]]
then
if is_daytime == nil or is_daytime then
icon = string.gsub(weather_now["currently"]["icon"], "night", "day")
else
icon = string.gsub(icon, "d", "n")
icon = string.gsub(weather_now["currently"]["icon"], "day", "night")
end
weather.icon_path = icons_path .. icon .. ".png"
--]]
print("****DEBUG**** weather_update if-arm")
widget = weather.widget
settings()
-- end
weather.icon_path = icons_path .. icon .. ".png"
print("****DEBUG**** weather_update if-arm")
widget = weather.widget
settings()
end
else
print("****DEBUG**** err: " .. err .. " ; type: " .. type(weather_now))
weather.icon_path = icons_path .. "na.png"
weather.widget:set_markup(weather_na_markup)
end
--]]
-- weather.icon:set_image(weather.icon_path)
weather.icon:set_image(weather.icon_path)
end)
end