feat(plymouth+resources): bundle bg-skull.svg in repo and archiso
Move the splash logo into resources/bg-skull.svg so it's tracked in git and always available alongside the dotfiles. build.sh now copies resources/ into /root/installer/resources/ on the ISO. The Plymouth module resolves the SVG from the repo copy first, ISO copy second — no user intervention or ~/Pictures setup required. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SyBNiWy3wpawrWb9ryVk7pmain
parent
fe72a4c71b
commit
52fe3a910e
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 24 KiB |
|
|
@ -176,6 +176,13 @@ cp "$DOTFILES_DIR/setup/arch-autoinstall.sh" "$PROFILE/airootfs/root/in
|
|||
# Reset script — wipes and reinstalls the system while preserving /home.
|
||||
cp "$DOTFILES_DIR/setup/reset-arch.sh" "$PROFILE/airootfs/root/installer/"
|
||||
|
||||
echo "Embedding resources (branding assets used by post-install modules)..."
|
||||
# resources/ contains shared assets (SVGs, etc.) referenced by installer modules
|
||||
# such as the Plymouth splash logo. Embedding them here means the ISO carries
|
||||
# everything needed so post-install steps never require the user to supply files.
|
||||
mkdir -p "$PROFILE/airootfs/root/installer/resources"
|
||||
cp -r "$DOTFILES_DIR/resources/." "$PROFILE/airootfs/root/installer/resources/"
|
||||
|
||||
# Make all scripts executable. The archiso tool preserves these bits in the
|
||||
# squashfs, so they will be executable on the live system too.
|
||||
chmod 755 \
|
||||
|
|
|
|||
|
|
@ -9,10 +9,14 @@
|
|||
# even commented "png file loader". bg-skull.svg must be converted to PNG with
|
||||
# rsvg-convert (higher fidelity than ImageMagick for SVG) before deployment.
|
||||
#
|
||||
# Logo resolution order (no user intervention required):
|
||||
# 1. $DOTFILES_DIR/resources/bg-skull.svg — repo copy, always present
|
||||
# 2. /root/installer/resources/bg-skull.svg — archiso embedded copy
|
||||
#
|
||||
# Steps:
|
||||
# 1. Install plymouth (extra repo)
|
||||
# 2. Install librsvg (rsvg-convert) + imagemagick if absent
|
||||
# 3. Convert ~/Pictures/bg-skull.svg → logo.png (300 px wide)
|
||||
# 3. Convert bg-skull.svg → logo.png (300 px wide)
|
||||
# 4. Generate a 10×10 magenta dot.png for the spinner
|
||||
# 5. Write the m-archy theme (.plymouth descriptor + .script animation)
|
||||
# 6. Register with plymouth-set-default-theme
|
||||
|
|
@ -24,7 +28,20 @@ set -euo pipefail
|
|||
source "$(dirname "${BASH_SOURCE[0]}")/../lib/logging.sh"
|
||||
|
||||
THEME_DIR="/usr/share/plymouth/themes/m-archy"
|
||||
LOGO_SVG="$HOME/Pictures/bg-skull.svg"
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
DOTFILES_DIR="$(cd "$SCRIPT_DIR/../../.." && pwd)"
|
||||
|
||||
# Resolve logo SVG — repo copy first, ISO embedded copy as fallback
|
||||
LOGO_SVG=""
|
||||
for _candidate in \
|
||||
"$DOTFILES_DIR/resources/bg-skull.svg" \
|
||||
"/root/installer/resources/bg-skull.svg"
|
||||
do
|
||||
if [[ -f "$_candidate" ]]; then
|
||||
LOGO_SVG="$_candidate"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# ── Install Plymouth ──────────────────────────────────────────────────────────
|
||||
log "Installing Plymouth..."
|
||||
|
|
@ -46,12 +63,11 @@ TMP_LOGO="$(mktemp /tmp/plymouth-logo.XXXXXX.png)"
|
|||
TMP_DOT="/tmp/plymouth-dot.png"
|
||||
trap 'rm -f "$TMP_LOGO" "$TMP_DOT"' EXIT
|
||||
|
||||
if [[ -f "$LOGO_SVG" ]]; then
|
||||
if [[ -n "$LOGO_SVG" ]]; then
|
||||
log "Converting $LOGO_SVG → PNG (300 px wide)..."
|
||||
rsvg-convert -w 300 "$LOGO_SVG" -o "$TMP_LOGO"
|
||||
else
|
||||
warn "$LOGO_SVG not found — using transparent placeholder."
|
||||
warn "Place bg-skull.svg in ~/Pictures and re-run this module to update the logo."
|
||||
warn "bg-skull.svg not found in repo resources or ISO — using transparent placeholder."
|
||||
convert -size 300x300 xc:transparent "$TMP_LOGO"
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue