feat: fix wallpapers
Some checks are pending
quality / changes (push) Waiting to run
quality / Flake Check (push) Blocked by required conditions
quality / Nix Format Check (push) Blocked by required conditions
quality / Deploy netty (push) Blocked by required conditions

This commit is contained in:
Harivansh Rathi 2026-04-09 10:49:58 -04:00
parent c2e589011f
commit 076db608b3
7 changed files with 15 additions and 13 deletions

View file

@ -77,8 +77,8 @@ CONTOUR_LEVELS: int = max(1, int(CONTOURS.get("levels", 20)))
# cozybox palette - matches lib/theme.nix
THEMES: dict[str, dict[str, Rgb]] = {
"dark": {
"bg": (0x18, 0x18, 0x18),
"line": (0x2d, 0x2d, 0x2d),
"bg": (0x00, 0x00, 0x00),
"line": (0x1a, 0x1a, 0x1a),
"label": (0xFF, 0xFF, 0xFF),
},
"light": {
@ -451,14 +451,16 @@ def gen() -> None:
if LABEL_ENABLED and font is not None:
draw = ImageDraw.Draw(img)
draw.text((LABEL_MARGIN_X, H - LABEL_MARGIN_BOTTOM), label, fill=colors["label"], font=font)
out_path = os.path.join(DIR, f"wallpaper-{theme_name}.jpg")
img.save(out_path, quality=95)
out_path = os.path.join(DIR, f"wallpaper-{theme_name}.png")
if os.path.exists(out_path):
os.remove(out_path)
img.save(out_path)
log(f"wrote theme={theme_name} path={out_path}")
link = os.path.join(DIR, "wallpaper.jpg")
link = os.path.join(DIR, "wallpaper.png")
if os.path.lexists(link):
os.unlink(link)
target = os.path.join(DIR, f"wallpaper-{theme}.jpg")
target = os.path.join(DIR, f"wallpaper-{theme}.png")
os.symlink(target, link)
log(f"finish status=ok target={target} link={link}")