Browse Source

Polish SpoolBuddy boot splash and reduce initramfs rebuilds

  New splash shows only the SpoolBuddy logo with green glow bloom,
  radial gradient, light rays, and vignette. Removed Bambuddy branding.
  Includes generator script for easy customization.

  Defers initramfs rebuild during install until after Plymouth theme
  is configured, avoiding redundant rebuilds from apt hooks.
maziggy 2 months ago
parent
commit
12c2b57962

+ 1 - 1
CHANGELOG.md

@@ -25,7 +25,7 @@ All notable changes to Bambuddy will be documented in this file.
 - **Removed Diagnostic Buttons from Write Tag Page** — Removed the "NFC Diag" and "Scale Diag" buttons from the NFC status panel on the Write Tag page. These diagnostics are accessible from the Settings page and don't belong on the tag writing flow.
 - **SpoolBuddy Assign Spool Modal No Longer Clips Display** — The shared Assign Spool modal overflowed off-screen on the small SpoolBuddy touchscreen, hiding the footer buttons. Added scoped CSS in the SpoolBuddy AMS page that caps the modal at 90vh with a scrollable spool list, without affecting the main Bambuddy frontend.
 - **SpoolBuddy System Tab** — Added a "System" tab to SpoolBuddy Settings showing live OS stats from the Raspberry Pi: CPU temperature, core count, load average, memory usage, disk usage, OS distro/kernel/architecture, Python version, and system uptime. Stats are collected by the daemon every heartbeat (10s) using stdlib-only reads from `/proc` and `/sys` — no additional dependencies required. Usage bars turn amber at 70% and red at 90%; CPU temperature is color-coded green/amber/red.
-- **SpoolBuddy Boot Splash Polished** — New splash image displays only the SpoolBuddy logo (removed Bambuddy branding) with polished glow effects, radial gradient background, subtle light rays, and vignette (66KB vs 205KB). A generator script (`generate_splash.py`) is included for easy customization.
+- **SpoolBuddy Boot Splash Polished** — New splash image displays only the SpoolBuddy logo (removed Bambuddy branding) with green glow bloom, radial gradient background, light rays, and vignette. A generator script (`generate_splash.py`) is included for easy customization. Also reduced redundant initramfs rebuilds during install by deferring the rebuild until after the Plymouth theme is configured.
 
 ### Fixed
 - **SpoolBuddy Read Tag Diagnostic Fails on NTAG Tags** — The `read_tag.py` diagnostic script had five issues preventing NTAG reads: (1) SAK `0x04` (MIFARE Ultralight family) was rejected as "unsupported tag type" — now accepts both `0x00` and `0x04`. (2) `ntag_read_pages` had TX CRC off (should be on per NTAG spec), no Crypto1 clear, and no IDLE→TRANSCEIVE state reset. (3) The PN5180 enters an unrecoverable state after an NTAG READ command — added full GPIO hardware reset between each 4-page batch. (4) Reading past the end of smaller tags (MIFARE Ultralight has 16 pages vs NTAG's 44+) caused a hard failure — now returns partial data gracefully. (5) `ntag_write_page`/`ntag_write_pages` had the same stale CRC/state issues plus unreliable ACK checking and post-write verification — synced with daemon.

+ 8 - 8
spoolbuddy/install/generate_splash.py

@@ -18,15 +18,15 @@ from PIL import Image, ImageDraw, ImageFilter
 
 # --- Configuration ---
 WIDTH, HEIGHT = 1024, 600
-BG_CENTER = (30, 30, 30)  # Slightly lighter center
-BG_EDGE = (8, 8, 8)  # Near-black edges
+BG_CENTER = (45, 45, 45)  # Brighter center for more visible gradient
+BG_EDGE = (5, 5, 5)  # Darker edges for stronger contrast
 ACCENT = (0, 174, 66)  # SpoolBuddy green (#00AE42)
-ACCENT_GLOW = (0, 200, 75)  # Slightly brighter for glow core
+ACCENT_GLOW = (0, 220, 85)  # Brighter glow core
 LOGO_SCALE = 0.50  # Scale logo to 50% of canvas width
-GLOW_RADIUS = 80  # Gaussian blur radius for glow
-VIGNETTE_STRENGTH = 0.55  # Edge darkening intensity
+GLOW_RADIUS = 120  # Wider glow spread
+VIGNETTE_STRENGTH = 0.70  # Stronger edge darkening
 RAY_COUNT = 24  # Number of radial light rays
-RAY_OPACITY = 12  # Subtle ray brightness (0-255)
+RAY_OPACITY = 28  # More visible rays (0-255)
 
 
 def radial_gradient(size, center_color, edge_color):
@@ -180,14 +180,14 @@ def generate_splash(output_path):
     print("  Rendering glow effects...")
 
     # Wide diffuse glow
-    glow_wide = create_glow(logo, ACCENT, radius=GLOW_RADIUS, intensity=1.2)
+    glow_wide = create_glow(logo, ACCENT, radius=GLOW_RADIUS, intensity=2.0)
     # Expand glow canvas to full size
     glow_canvas = Image.new("RGBA", (WIDTH, HEIGHT), (0, 0, 0, 0))
     glow_canvas.paste(glow_wide, (logo_x, logo_y), glow_wide)
     canvas = Image.alpha_composite(canvas.convert("RGBA"), glow_canvas)
 
     # Tighter brighter glow
-    glow_tight = create_glow(logo, ACCENT_GLOW, radius=GLOW_RADIUS // 3, intensity=0.8)
+    glow_tight = create_glow(logo, ACCENT_GLOW, radius=GLOW_RADIUS // 3, intensity=1.5)
     glow_canvas2 = Image.new("RGBA", (WIDTH, HEIGHT), (0, 0, 0, 0))
     glow_canvas2.paste(glow_tight, (logo_x, logo_y), glow_tight)
     canvas = Image.alpha_composite(canvas, glow_canvas2)

+ 12 - 0
spoolbuddy/install/install.sh

@@ -878,7 +878,19 @@ setup_kiosk() {
     fi
 
     # ── Install kiosk packages ────────────────────────────────────────────
+    # Temporarily block initramfs rebuilds during package install — we rebuild
+    # once at the end after the Plymouth theme is configured, saving ~4 runs
+    # (one per installed kernel per hook trigger).
+    if [[ -x /usr/sbin/update-initramfs ]]; then
+        dpkg-divert --local --rename --add /usr/sbin/update-initramfs >/dev/null 2>&1 || true
+        ln -sf /bin/true /usr/sbin/update-initramfs
+    fi
     run_with_progress "Installing kiosk packages" apt-get install -y labwc chromium plymouth wlr-randr
+    # Restore real update-initramfs
+    if dpkg-divert --list /usr/sbin/update-initramfs 2>/dev/null | grep -q local; then
+        rm -f /usr/sbin/update-initramfs
+        dpkg-divert --local --rename --remove /usr/sbin/update-initramfs >/dev/null 2>&1 || true
+    fi
 
     # ── config.txt tweaks ─────────────────────────────────────────────────
     local boot_config="/boot/firmware/config.txt"

BIN
spoolbuddy/install/splash.png