summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@gmail.com>2021-01-24 14:12:00 -0500
committerstreetturtle <streetturtle@gmail.com>2021-01-24 14:12:00 -0500
commit565014c1314f3d206b3e5bb57c40998e046f35ca (patch)
treefa843b550e9deb5c31160dcd6a7ef0fe88578536
parent9b66b2ee444124df22543ccc38cd7b3b6302f994 (diff)
[weather] #234 fix
use white to negative and black for positive temperatures for hourly forecast
-rw-r--r--weather-widget/weather.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/weather-widget/weather.lua b/weather-widget/weather.lua
index e58efb1..4df43ea 100644
--- a/weather-widget/weather.lua
+++ b/weather-widget/weather.lua
@@ -373,7 +373,9 @@ local function worker(user_args)
widget = wibox.widget.textbox
})
table.insert(temp_below, wibox.widget {
- markup = '<span >' .. string.format('%.0f', hour.temp) .. '°' .. '</span>',
+ markup = '<span foreground="'
+ .. (tonumber(hour.temp) > 0 and '#2E3440' or '#ECEFF4') .. '">'
+ .. string.format('%.0f', hour.temp) .. '°' .. '</span>',
align = 'center',
font = font_name .. ' 9',
widget = wibox.widget.textbox