fix: inverse logic
I only need to add a prefix when it is not day. Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This commit is contained in:
parent
6f4c1deac2
commit
449f2dbb39
|
@ -295,7 +295,7 @@ local function worker(user_args)
|
||||||
layout = wibox.layout.flex.horizontal,
|
layout = wibox.layout.flex.horizontal,
|
||||||
update = function(self, weather)
|
update = function(self, weather)
|
||||||
local day_night_extension = ""
|
local day_night_extension = ""
|
||||||
if weather.is_day then
|
if not weather.is_day then
|
||||||
day_night_extension = "-night"
|
day_night_extension = "-night"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -322,7 +322,7 @@ local function worker(user_args)
|
||||||
-- Free plan allows forecast for up to three days, each with hours
|
-- Free plan allows forecast for up to three days, each with hours
|
||||||
if i > 3 then break end
|
if i > 3 then break end
|
||||||
local day_night_extension = ""
|
local day_night_extension = ""
|
||||||
if day.is_day then
|
if not day.is_day then
|
||||||
day_night_extension = "-night"
|
day_night_extension = "-night"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -591,7 +591,7 @@ local function worker(user_args)
|
||||||
local result = json.decode(stdout)
|
local result = json.decode(stdout)
|
||||||
|
|
||||||
local day_night_extension = ""
|
local day_night_extension = ""
|
||||||
if result.current.is_day then
|
if not result.current.is_day then
|
||||||
day_night_extension = "-night"
|
day_night_extension = "-night"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue