From 9f6414838d4fabc174bb193f34225de8d9fc8079 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 29 Sep 2026 14:17:33 +0200 Subject: feat(immich): fall back to the past week's memories A day with no memories left the card showing only a notice. When today has none, immich-fetch.sh now merges the memories of each of the past six days, skipping a day whose request fails, and marks the index with a scope week line. The subtitle names where the photos come from, Today or This week, before the i/n counter, and the empty notice reads no memories this week. Co-Authored-By: Claude Opus 5.5 --- widgets/immich.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'widgets/immich.lua') diff --git a/widgets/immich.lua b/widgets/immich.lua index a9caca7..8590dbf 100644 --- a/widgets/immich.lua +++ b/widgets/immich.lua @@ -69,7 +69,7 @@ function M.draw(cr, rect, colors) return end if #photos == 0 then - card.notice(cr, inner, colors, 'MEMORIES', 'no memories today', + card.notice(cr, inner, colors, 'MEMORIES', 'no memories this week', os.date('%d/%m')) return end @@ -81,7 +81,8 @@ function M.draw(cr, rect, colors) local ago = p.year and (tonumber(os.date('%Y')) - p.year) or nil local big = ago and tostring(ago) or '--' - local sub = n > 1 and string.format('%d/%d', i, n) or '' + local sub = (photos.week and 'This week' or 'Today') + .. (n > 1 and string.format(' %d/%d', i, n) or '') local t = p.taken local taken = t and string.format('%02d/%02d/%04d %02d:%02d', t[3], t[2], t[1], t[4], t[5]) or '--' -- cgit v1.2.3