From ceaac5525eb96a6d98ecc6ccacfddcd08669fed9 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 31 Mar 2020 08:16:15 +0200 Subject: [PATCH] widgets: tentative to fix calendar for days of last week --- rc/widgets.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rc/widgets.lua b/rc/widgets.lua index 839b65c..8599014 100644 --- a/rc/widgets.lua +++ b/rc/widgets.lua @@ -43,10 +43,10 @@ local cal = ( local cal = awful.util.pread("ncal -h -w -m " .. datespec) -- Highlight the current date and month if offset == 0 then - cal = cal:gsub(string.format("( %d )", curdate.day), - string.format('%%1', - beautiful.fg_widget_clock), - 1) + cal, n = cal:gsub(string.format("( %d)([ \n])", curdate.day), + string.format('%%1%%2', + beautiful.fg_widget_clock), + 1) end -- Month and year cal = cal:gsub("^( +[^ ]+ [0-9]+) *",