Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions widget/cal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,14 @@ local function factory(args)
notifytable[#notifytable+1] = string.format("%3s ", os.date("%a", os.time { year = 2006, month = 1, day = day_num + cal.week_start }))
end
notifytable[#notifytable] = string.format("%s\n%s", notifytable[#notifytable]:sub(1, -2), string.rep(" ", st_day*4))
local strx
for x = 1,mth_days do
strx = x
local strx
if x == today then
if x < 10 then x = " " .. x end
strx = markup.bold(markup.color(cal.notification_preset.bg, cal.notification_preset.fg, x) .. " ")
local x_str = x
if x < 10 then x_str = " " .. x end
strx = markup.bold(markup.color(cal.notification_preset.bg, cal.notification_preset.fg, x_str) .. " ")
else
strx = x
end
strx = string.format("%s%s", string.rep(" ", 3 - tostring(x):len()), strx)
notifytable[#notifytable+1] = string.format("%-4s%s", strx, (x+st_day)%7==0 and x ~= mth_days and "\n" or "")
Expand Down Expand Up @@ -188,4 +190,4 @@ local function factory(args)
return cal
end

return factory
return factory