From 3fcb00cacd9630f3927a4d7e9fec9cf425d35f68 Mon Sep 17 00:00:00 2001 From: Luka5W <74739057+Luka5W@users.noreply.github.com> Date: Sun, 8 Oct 2023 17:46:18 +0000 Subject: [PATCH] added option to show week numbers, possible fix for #316 --- calendar-widget/calendar.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/calendar-widget/calendar.lua b/calendar-widget/calendar.lua index 6658ec88..91ca033a 100644 --- a/calendar-widget/calendar.lua +++ b/calendar-widget/calendar.lua @@ -157,7 +157,7 @@ local function worker(user_args) -- Change bg color for weekends local d = { year = date.year, month = (date.month or 1), day = (date.day or 1) } local weekday = tonumber(os.date('%w', os.time(d))) - local default_bg = (weekday == 0 or weekday == 6) + local default_bg = (flag == 'focus' or flag == 'normal') and (weekday == 0 or weekday == 6) and calendar_themes[theme].weekend_day_bg or calendar_themes[theme].bg local ret = wibox.widget { @@ -174,7 +174,7 @@ local function worker(user_args) shape_border_color = props.border_color or '#000000', shape_border_width = props.border_width or 0, fg = props.fg_color or calendar_themes[theme].fg, - bg = props.bg_color or default_bg, + bg = default_bg, widget = wibox.container.background } @@ -187,6 +187,7 @@ local function worker(user_args) fn_embed = decorate_cell, long_weekdays = true, start_sunday = start_sunday, + week_numbers = week_numbers, widget = wibox.widget.calendar.month }