From 449f2dbb3944e58ebe6a97ac87bf5137b76d255a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Jaenisch?= Date: Thu, 24 Oct 2024 11:14:00 +0200 Subject: [PATCH] fix: inverse logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I only need to add a prefix when it is not day. Signed-off-by: André Jaenisch --- weather-api-widget/weather.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/weather-api-widget/weather.lua b/weather-api-widget/weather.lua index 81d5c07..821b097 100644 --- a/weather-api-widget/weather.lua +++ b/weather-api-widget/weather.lua @@ -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 @@ -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 @@ -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