diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-29 14:17:33 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-29 14:17:33 +0200 |
| commit | 9f6414838d4fabc174bb193f34225de8d9fc8079 (patch) | |
| tree | 486f00b96a2174a783122c0e11a5d13c6c5ca965 /widgets | |
| parent | 4300fb5a232a2edf5262073ab7b898b8cbb126e4 (diff) | |
| download | conky-theme-udt-9f6414838d4fabc174bb193f34225de8d9fc8079.tar.gz conky-theme-udt-9f6414838d4fabc174bb193f34225de8d9fc8079.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'widgets')
| -rw-r--r-- | widgets/immich.lua | 5 |
1 files changed, 3 insertions, 2 deletions
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 '--' |
