crossfetch v2 — Multi-theme + Liturgical Year Design#
Date: 2026-08-12 Status: Approved (pending written-spec review)
Overview#
Extend the existing crossfetch / ricefx rice tools (in ~/.local/bin) with:
- Multiple base terminal themes (rose-pine, tokyo-night, gruvbox, catppuccin-mocha, nord, dracula).
- A Western (Gregorian) liturgical-calendar engine: every day belongs to a season that drives default colors; major feast days get a special emblem, verse, and a one-time fullscreen animation (analogous to hyfetch's pride-month easter egg).
- A fastfetch config generator so
config.jsonccolors follow the active theme.
No fork of hyfetch. The hyfetch repo (~/git/hyfetch) is untouched; it served only as
the reference for the "seasonal easter egg" pattern (hyfetch/pride_month.py,
main.py:532-542, one-shot-per-year state flag).
Goals#
- Theme switch via one env var; all animation/logo/fetch output follows.
- Liturgical season colors applied automatically, year-round, no manual steps.
- Feast-day emblems + one-shot animations, shown once per feast per year.
- fastfetch panel (keys/title/bars) matches the active theme, not hardcoded Rose Pine.
Non-goals#
- Orthodox (Julian) computus — Western Gregorian only (user decision).
- Forking/renaming hyfetch.
- Changing which fastfetch modules are displayed (layout stays as-is).
Components#
1. ricefx.py — theme table#
ACCENTSgrows from{dawn, dark}to named themes:rose-pine(= currentdark),rose-pine-dawn(= currentdawn),tokyo-night,gruvbox,catppuccin-mocha,nord,dracula.- Every theme maps the same accent role names (
love gold rose pine foam iris text subtle muted) to that theme's official palette hexes, plus abackground()value per theme. Role names are the API — crossfetch, burst, shimmer, sweep all keep working untouched. theme()resolution order:$RICEFX_THEMEenv (existing var) → existing auto light/dark detection (maps torose-pine-dawn/rose-pine). Unknown name → fall back torose-pine, warn once on stderr.- Backward compat:
dawn/darkremain as aliases.
2. liturgy.py — calendar engine (new, ~/.local/bin, importable like ricefx)#
easter(year) -> date— Gregorian computus (Anonymous/Meeus algorithm).season(d: date) -> SeasonwhereSeason = (id, name, color_roles):- Advent (4 Sundays before Christmas → Dec 24): purple →
iris+subtle - Christmastide (Dec 25 → Jan 5): white/gold →
gold+text - Epiphanytide / Ordinary I (Jan 6 → Ash Wednesday eve): green →
pine+foam - Lent (Ash Wednesday → eve of Palm Sunday): purple →
iris+muted - Holy Week (Palm Sunday → Holy Saturday): crimson →
love+muted - Eastertide (Easter → Pentecost): white/gold →
gold+foam - Ordinary II (day after Pentecost → Advent eve): green →
pine+foamPentecost itself is a feast (redlove+gold), not a season — feast colors override season colors for the day. Liturgical colors are expressed as accent role pairs, resolved through the active theme at render time — so purple is Rose Pine iris on rose-pine, Tokyo Night purple on tokyo-night, etc.
- Advent (4 Sundays before Christmas → Dec 24): purple →
feast(d: date) -> Feast | None: Christmas (Dec 25), Epiphany (Jan 6), Ash Wednesday, Palm Sunday, Good Friday, Easter, Ascension (Easter+39), Pentecost (Easter+49), All Saints (Nov 1).Feast = (id, name, emblem, verse, color_roles).- Pure functions, no I/O — fully unit-testable.
3. crossfetch integration#
- Season colors: when
$CROSS_BURSTis unset, the burst accent pair comes fromliturgy.season(today).color_rolesinstead of the staticgold,irisdefault. Static--logogradient and--fetchglow tint likewise blend season roles into the poster ramp. Explicit$CROSS_BURSTalways wins. - Feast one-shot: on interactive startup (the zshrc splash path), if today is a
feast and
shown.jsonlacks{year: feast_id}, run the fullscreen burst with the feast's emblem, colors, and verse (overridesdaily_verse()), then record it in~/.local/state/crossfetch/shown.json. Subsequent launches that day render the normal splash but keep feast colors + emblem.$CROSS_FEAST=offdisables;crossfetch --feast [id]replays on demand. - New emblems (mask format, same
#-grid as existing 6):star(Star of Bethlehem — Christmas, Epiphany),dove(Pentecost),thorns(crown of thorns — Good Friday). Other feasts reuse existing symbols (Easter →chi, Palm Sunday →jerusalem, All Saints →orthodox, Ash Wednesday →cross, Ascension →chi).
4. fastfetch config generator#
- Source of truth moves to
~/.config/crossfetch/fastfetch.template.jsonc— the currentconfig.jsoncwith every hardcoded38;2;R;G;Bfragment replaced by{{role}}placeholders (e.g.{{gold}},{{text}},{{subtle}}). crossfetch --sync-fastfetchrenders template →~/.config/fastfetch/config.jsoncusing the active theme's roles. Comments survive because it is plain string substitution, not JSON re-serialization.- Contrast guard: generator reuses ricefx's legibility check; a role below the readable-contrast threshold on the theme background is swapped for its legible fallback (same rule that keeps pine off dark backgrounds today).
5. zshrc startup block#
- Existing splash invocation unchanged.
- Staleness check: if
cross.txtmtime date ≠ today or stored theme marker ≠$RICEFX_THEME, runcrossfetch --logo > cross.txtandcrossfetch --sync-fastfetch. Marker file:~/.local/state/crossfetch/last-render(date + theme name).
Error handling#
- Unknown
$RICEFX_THEME→ rose-pine + single stderr warning. - Missing/corrupt
shown.json→ recreate empty; never crash the shell splash. --sync-fastfetchwith missing template → print instructive error, leave existingconfig.jsoncuntouched (never write a partial file; write temp + rename).NO_COLORbehavior unchanged (skips animation,--logostays colored).
Testing#
- pytest module
test_liturgy.py(runnable from~/.local/bin):easter()vs known dates 2024–2030 (e.g. 2024-03-31, 2025-04-20, 2026-04-05, 2027-03-28, 2028-04-16, 2029-04-01, 2030-04-21).- Season boundaries: Advent start Sundays, Dec 24/25 flip, Ash Wednesday, Easter/Pentecost edges, Ordinary resumption.
feast()hits and misses.
- Theme table sanity test: every theme defines every role + background.
- Visual smoke (manual):
RICEFX_THEME=x crossfetch --logofor each theme;crossfetch --feast easterreplay.
Rollout#
- ricefx themes → 2. liturgy.py + tests → 3. crossfetch season/feast wiring +
new emblems → 4. template +
--sync-fastfetch→ 5. zshrc staleness block. Each step leaves the current setup working (season wiring only activates when$CROSS_BURSTunset; template generated from the existing config).