I have the following code for a calendar which I attach to a date text e.g. 15 Jan 2024:
mytextcalendar = wibox.widget.textclock("%d %b %Y", 2, "Europe/London")
local function rounded_shape(size, partial)
if partial then
return function(cr, width, height)
gears.shape.partially_rounded_rect(cr, width, height,
false, true, false, true, 5)
end
else
return function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, size)
end
end
end
local month_calendar = awful.widget.calendar_popup.year({
font = "monaco 11",
opacity=0.8,
spacing=0,
margin=0,
style_month = { padding = 0,
bg_color = '#222222',
border_width = 3,
border_color = '#222222',
shape = rounded_shape(10)},
style_normal = { shape = rounded_shape(5), },
style_focus = { fg_color = '#222222',
bg_color = '#ff9800',
shape = rounded_shape(5, true)},
style_header = { fg_color = '#ff9800',
border_width = 0,
shape = rounded_shape(10)},
style_yearheader = {border_width = 0,
bg_color = '#222222',
fg_color = '#ff9800'},
style_weekday = { fg_color = '#de5e1e',
border_width = 0,
shape = rounded_shape(5)}
})
month_calendar:attach( mytextcalendar, "tr", { on_hover = false, })
Then I simply add the variable mytextcalendar to the systemtray, which works okay.
What I would like to do is to change the background of Saturdays and Sundays. I already found it done here
The only problem is that I can't find a way to transfer the code over. Mainly my question is: how can I use fn_embed = decorate_cell, (which is in the documentation) with my code?