Skip to content

Commit

Permalink
fix: inverse logic
Browse files Browse the repository at this point in the history
I only need to add a prefix when it is not day.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
  • Loading branch information
Ryuno-Ki committed Oct 24, 2024
1 parent 6f4c1de commit 449f2db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions weather-api-widget/weather.lua
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ local function worker(user_args)
layout = wibox.layout.flex.horizontal,
update = function(self, weather)
local day_night_extension = ""
if weather.is_day then
if not weather.is_day then
day_night_extension = "-night"
end

Expand All @@ -322,7 +322,7 @@ local function worker(user_args)
-- Free plan allows forecast for up to three days, each with hours
if i > 3 then break end
local day_night_extension = ""
if day.is_day then
if not day.is_day then
day_night_extension = "-night"
end

Expand Down Expand Up @@ -591,7 +591,7 @@ local function worker(user_args)
local result = json.decode(stdout)

local day_night_extension = ""
if result.current.is_day then
if not result.current.is_day then
day_night_extension = "-night"
end

Expand Down

0 comments on commit 449f2db

Please sign in to comment.