Compare commits
3 Commits
d9e4d67013
...
f5a1182a3d
| Author | SHA1 | Date |
|---|---|---|
|
|
f5a1182a3d | |
|
|
52fe3a910e | |
|
|
fe72a4c71b |
|
|
@ -35,6 +35,7 @@ The TUI walks you through:
|
|||
- `core` — 100+ base system packages
|
||||
- `svc` — core services (NetworkManager, cronie, fail2ban, greetd)
|
||||
- `shell` — zsh, Neovim, Yazi, Micro, Starship
|
||||
- `plymouth` — boot splash screen (skull logo + magenta spinner, **on by default**)
|
||||
3. **Desktop Environment** — HyprLua, Niri, Hyprland, Sway, KDE Plasma, GNOME, COSMIC, XFCE, LXQt, or none
|
||||
4. **Applications** — checklist of ~50 optional apps (see [Modules](modules.md))
|
||||
5. **Colorway** — optional; enter hex values to customise the CyberQueer palette
|
||||
|
|
@ -79,7 +80,7 @@ This dry-runs every installer dialog and saves your choices. **No software is in
|
|||
"fido2_root": false,
|
||||
"fido2_user": false,
|
||||
"run_tui": true,
|
||||
"components": ["pkg", "core", "svc", "shell"],
|
||||
"components": ["pkg", "core", "svc", "shell", "plymouth"],
|
||||
"desktop_environment": "hyprlua",
|
||||
"apps": ["firefox-browser", "vscodium", "docker"],
|
||||
"colors": {
|
||||
|
|
@ -102,7 +103,7 @@ This dry-runs every installer dialog and saves your choices. **No software is in
|
|||
| `fido2_root` | bool | Enroll FIDO2 key for LUKS unlock |
|
||||
| `fido2_user` | bool | Enroll FIDO2 key for PAM login |
|
||||
| `run_tui` | bool | Run dotfiles setup automatically after base install |
|
||||
| `components` | array | Dotfiles components to install |
|
||||
| `components` | array | Dotfiles components to install (`"pkg"`, `"core"`, `"svc"`, `"shell"`, `"plymouth"`) |
|
||||
| `desktop_environment` | string | DE name or `"none"` |
|
||||
| `apps` | array | Optional app IDs (see [Modules](modules.md)) |
|
||||
| `colors` | object | Optional colour overrides (omit to keep defaults) |
|
||||
|
|
@ -180,6 +181,8 @@ The backup key can be collected by Ansible — see [FreeIPA & Ansible](freeipa-a
|
|||
| LUKS + password | `base udev autodetect microcode modconf kms consolefont block encrypt lvm2 btrfs filesystems keyboard keymap fsck` |
|
||||
| LUKS + FIDO2 | `base udev systemd autodetect microcode modconf kms consolefont block sd-encrypt lvm2 btrfs filesystems keyboard keymap fsck` |
|
||||
|
||||
When Plymouth is enabled the installer automatically injects the appropriate hook (`plymouth` after `udev`, or `sd-plymouth` after `systemd`) and adds `quiet splash` to `GRUB_CMDLINE_LINUX_DEFAULT`.
|
||||
|
||||
---
|
||||
|
||||
## Custom Live ISO
|
||||
|
|
|
|||
|
|
@ -47,6 +47,17 @@ Also deploys `greetd-tuigreet` config from the dotfiles.
|
|||
- **Yazi** file manager
|
||||
- Deploys `.bashrc`, `.zshrc`, `starship.toml`, Micro config, Neovim config
|
||||
|
||||
### `plymouth` — Boot Splash *(on by default)*
|
||||
|
||||
Installs the **M-Archy Plymouth theme**: the skull logo (`resources/bg-skull.svg`) centred on a dark background with a 12-dot magenta spinner animation below it.
|
||||
|
||||
- Converts the bundled SVG to PNG via `rsvg-convert` (Plymouth's image loader is PNG-only)
|
||||
- Injects the `plymouth` or `sd-plymouth` mkinitcpio hook automatically (detects `udev` vs `systemd` hook set)
|
||||
- Adds `quiet splash` to `GRUB_CMDLINE_LINUX_DEFAULT` and regenerates GRUB config
|
||||
- Rebuilds the initramfs so the theme is baked in
|
||||
|
||||
To install with a **custom image** on an existing system, use `install-modules.sh` and select *Plymouth (custom)* — you will be prompted for a PNG or SVG path.
|
||||
|
||||
---
|
||||
|
||||
## Desktop Environments
|
||||
|
|
@ -198,6 +209,8 @@ bash ~/Dotfiles/setup/install-modules.sh
|
|||
|
||||
| ID | Packages | Description |
|
||||
|----|---------|-------------|
|
||||
| `plymouth` | plymouth · librsvg | Boot splash (bundled skull logo + spinner) — same as the core component |
|
||||
| `plymouth-custom` | plymouth · librsvg or imagemagick | Boot splash with a user-supplied image; prompts for a PNG or SVG path |
|
||||
| `tlp` | tlp · tlp-rdw | Laptop battery optimisation |
|
||||
| `zfs` | zfs-dkms | ZFS kernel module |
|
||||
| `wprs` | wprs-git (AUR) | Wayland proxy for remote sessions |
|
||||
|
|
|
|||
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 \
|
||||
|
|
|
|||
|
|
@ -191,11 +191,12 @@ if [[ "$AF_RUN_TUI" == "true" ]]; then
|
|||
# ── Components ────────────────────────────────────────────────────────────
|
||||
AF_COMPONENTS=$(dialog --backtitle "$BACKTITLE" \
|
||||
--title " Select Components " \
|
||||
--checklist "Space toggles · Enter confirms · Esc quits" 15 68 4 \
|
||||
"pkg" "Package managers yay · nvm · rust" on \
|
||||
"core" "Core packages 100+ base system packages" on \
|
||||
"svc" "Core services NetworkManager · cronie · fail2ban" on \
|
||||
"shell" "Shell setup zsh · nvim · yazi · micro · starship" on \
|
||||
--checklist "Space toggles · Enter confirms · Esc quits" 16 68 5 \
|
||||
"pkg" "Package managers yay · nvm · rust" on \
|
||||
"core" "Core packages 100+ base system packages" on \
|
||||
"svc" "Core services NetworkManager · cronie · fail2ban" on \
|
||||
"shell" "Shell setup zsh · nvim · yazi · micro · starship" on \
|
||||
"plymouth" "Plymouth boot splash — skull logo + spinner" on \
|
||||
3>&1 1>&2 2>&3) || AF_COMPONENTS=""
|
||||
|
||||
# ── DE ────────────────────────────────────────────────────────────────────
|
||||
|
|
|
|||
|
|
@ -111,6 +111,8 @@ count_steps() {
|
|||
[[ "$sel" == *"ffmpeg"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$sel" == *"localtunnel"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$sel" == *"butter"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$sel" == *"plymouth"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$sel" == *"plymouth-custom"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$sel" == *"tlp"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$sel" == *"steam"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$sel" == *"vesktop"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
|
|
@ -207,6 +209,8 @@ SELECTED=$(dialog --backtitle "$BACKTITLE" \
|
|||
"ffmpeg" "FFmpeg extras thumbnailer · GStreamer codecs" off \
|
||||
"localtunnel" "LocalTunnel expose localhost via tunnel" off \
|
||||
"butter" "butter btrfs snapshot backup (AUR)" off \
|
||||
"plymouth" "Plymouth boot splash — skull logo + spinner" off \
|
||||
"plymouth-custom" "Plymouth (custom) boot splash — supply your own image" off \
|
||||
"tlp" "TLP laptop power management" off \
|
||||
\
|
||||
"steam" "Steam gaming platform" off \
|
||||
|
|
@ -251,6 +255,26 @@ SELECTED=$(dialog --backtitle "$BACKTITLE" \
|
|||
|
||||
[[ -z "$SELECTED" ]] && { clear; echo "Nothing selected."; exit 0; }
|
||||
|
||||
# ── Plymouth custom logo ───────────────────────────────────────────────────────
|
||||
# Ask for image path now (before the confirmation dialog) so it can appear in
|
||||
# the summary. The path is exported and picked up by plymouth-custom.sh.
|
||||
PLYMOUTH_LOGO_SRC=""
|
||||
if [[ "$SELECTED" == *"plymouth-custom"* ]]; then
|
||||
PLYMOUTH_LOGO_SRC=$(dialog --backtitle "$BACKTITLE" \
|
||||
--title " Plymouth — Custom Logo " \
|
||||
--inputbox "\n Path to the image to display during boot.\n\n PNG → used as-is (must already be the right size)\n SVG → converted to PNG automatically via rsvg-convert\n\n Leave blank to use a transparent placeholder.\n" \
|
||||
13 66 "" \
|
||||
3>&1 1>&2 2>&3) || PLYMOUTH_LOGO_SRC=""
|
||||
|
||||
if [[ -n "$PLYMOUTH_LOGO_SRC" && ! -f "$PLYMOUTH_LOGO_SRC" ]]; then
|
||||
dialog --backtitle "$BACKTITLE" \
|
||||
--title " Warning " \
|
||||
--msgbox "\n File not found:\n $PLYMOUTH_LOGO_SRC\n\n A transparent placeholder will be used instead.\n" \
|
||||
9 62
|
||||
PLYMOUTH_LOGO_SRC=""
|
||||
fi
|
||||
fi
|
||||
|
||||
SUMMARY=""
|
||||
[[ "$SELECTED" == *"kde-plasma"* ]] && SUMMARY+=" ✦ KDE Plasma\n"
|
||||
[[ "$SELECTED" == *"gnome"* ]] && SUMMARY+=" ✦ GNOME\n"
|
||||
|
|
@ -278,7 +302,15 @@ SUMMARY=""
|
|||
[[ "$SELECTED" == *"imagemagick"* ]] && SUMMARY+=" ✦ ImageMagick\n"
|
||||
[[ "$SELECTED" == *"ffmpeg"* ]] && SUMMARY+=" ✦ FFmpeg extras\n"
|
||||
[[ "$SELECTED" == *"localtunnel"* ]] && SUMMARY+=" ✦ LocalTunnel\n"
|
||||
[[ "$SELECTED" == *"butter"* ]] && SUMMARY+=" ✦ butter (btrfs backup)\n"
|
||||
[[ "$SELECTED" == *"butter"* ]] && SUMMARY+=" ✦ butter (btrfs backup)\n"
|
||||
[[ "$SELECTED" == *"plymouth"* ]] && SUMMARY+=" ✦ Plymouth boot splash\n"
|
||||
if [[ "$SELECTED" == *"plymouth-custom"* ]]; then
|
||||
if [[ -n "$PLYMOUTH_LOGO_SRC" ]]; then
|
||||
SUMMARY+=" ✦ Plymouth (custom logo: $PLYMOUTH_LOGO_SRC)\n"
|
||||
else
|
||||
SUMMARY+=" ✦ Plymouth (custom logo: placeholder — no file given)\n"
|
||||
fi
|
||||
fi
|
||||
[[ "$SELECTED" == *"tlp"* ]] && SUMMARY+=" ✦ TLP\n"
|
||||
[[ "$SELECTED" == *"steam"* ]] && SUMMARY+=" ✦ Steam\n"
|
||||
[[ "$SELECTED" == *"vesktop"* ]] && SUMMARY+=" ✦ Vesktop\n"
|
||||
|
|
@ -351,8 +383,13 @@ DE_DIR="$MODULES/Desktop-Environments"
|
|||
[[ "$SELECTED" == *"imagemagick"* ]] && run_module "ImageMagick" "$APPS/imagemagick.sh"
|
||||
[[ "$SELECTED" == *"ffmpeg"* ]] && run_module "FFmpeg extras" "$APPS/ffmpeg.sh"
|
||||
[[ "$SELECTED" == *"localtunnel"* ]] && run_module "LocalTunnel" "$APPS/localtunnel.sh"
|
||||
[[ "$SELECTED" == *"butter"* ]] && run_module "butter" "$APPS/butter.sh"
|
||||
[[ "$SELECTED" == *"tlp"* ]] && run_module "TLP" "$APPS/tlp.sh"
|
||||
[[ "$SELECTED" == *"butter"* ]] && run_module "butter" "$APPS/butter.sh"
|
||||
[[ "$SELECTED" == *"plymouth"* ]] && run_module "Plymouth" "$MODULES/optional-Modules/plymouth.sh"
|
||||
if [[ "$SELECTED" == *"plymouth-custom"* ]]; then
|
||||
export PLYMOUTH_LOGO_SRC
|
||||
run_module "Plymouth (custom)" "$APPS/plymouth-custom.sh"
|
||||
fi
|
||||
[[ "$SELECTED" == *"tlp"* ]] && run_module "TLP" "$APPS/tlp.sh"
|
||||
[[ "$SELECTED" == *"steam"* ]] && run_module "Steam" "$APPS/steam.sh"
|
||||
[[ "$SELECTED" == *"vesktop"* ]] && run_module "Vesktop" "$APPS/vesktop.sh"
|
||||
[[ "$SELECTED" == *"spotify"* ]] && run_module "Spotify" "$APPS/spotify.sh"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
# plymouth-custom.sh — Plymouth boot splash with user-supplied logo
|
||||
#
|
||||
# Called by install-modules.sh with PLYMOUTH_LOGO_SRC already exported.
|
||||
# Validates the path then delegates all installation work to plymouth.sh.
|
||||
# Supports PNG (used as-is) and SVG (converted via rsvg-convert).
|
||||
|
||||
set -euo pipefail
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
|
||||
|
||||
if [[ -z "${PLYMOUTH_LOGO_SRC:-}" ]]; then
|
||||
err "PLYMOUTH_LOGO_SRC is not set — cannot install custom Plymouth theme."
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -f "$PLYMOUTH_LOGO_SRC" ]]; then
|
||||
err "Logo file not found: $PLYMOUTH_LOGO_SRC"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Custom Plymouth logo: $PLYMOUTH_LOGO_SRC"
|
||||
export PLYMOUTH_LOGO_SRC
|
||||
exec bash "$(dirname "${BASH_SOURCE[0]}")/../plymouth.sh"
|
||||
|
|
@ -0,0 +1,201 @@
|
|||
#!/bin/bash
|
||||
# plymouth.sh — Plymouth boot splash installer
|
||||
#
|
||||
# Installs the M-Archy Plymouth theme: skull logo centred on a dark background
|
||||
# with a magenta spinning-dot animation below it.
|
||||
#
|
||||
# SVG NOTE: Plymouth's image loader (ply-image) is PNG-only — it links against
|
||||
# libpng and has no SVG or gdk-pixbuf dependency. The ply-image.h header is
|
||||
# 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:
|
||||
# 1. $PLYMOUTH_LOGO_SRC env var — caller-supplied custom image (PNG or SVG)
|
||||
# 2. $DOTFILES_DIR/resources/bg-skull.svg — repo copy, always present
|
||||
# 3. /root/installer/resources/bg-skull.svg — archiso embedded copy
|
||||
#
|
||||
# PNG inputs are used directly; SVG inputs are converted via rsvg-convert.
|
||||
#
|
||||
# Steps:
|
||||
# 1. Install plymouth (extra repo)
|
||||
# 2. Install librsvg (rsvg-convert) if logo is SVG; imagemagick for dot
|
||||
# 3. Produce logo.png (300 px wide) from the resolved source
|
||||
# 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
|
||||
# 7. Inject plymouth / sd-plymouth hook into /etc/mkinitcpio.conf
|
||||
# 8. Add 'quiet splash' to GRUB_CMDLINE_LINUX_DEFAULT
|
||||
# 9. Regenerate GRUB config and initramfs
|
||||
|
||||
set -euo pipefail
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/../lib/logging.sh"
|
||||
|
||||
THEME_DIR="/usr/share/plymouth/themes/m-archy"
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
DOTFILES_DIR="$(cd "$SCRIPT_DIR/../../.." && pwd)"
|
||||
|
||||
# Resolve logo source — env var takes priority, then bundled SVG
|
||||
LOGO_SRC="${PLYMOUTH_LOGO_SRC:-}"
|
||||
if [[ -z "$LOGO_SRC" ]]; then
|
||||
for _candidate in \
|
||||
"$DOTFILES_DIR/resources/bg-skull.svg" \
|
||||
"/root/installer/resources/bg-skull.svg"
|
||||
do
|
||||
if [[ -f "$_candidate" ]]; then
|
||||
LOGO_SRC="$_candidate"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# ── Install Plymouth ──────────────────────────────────────────────────────────
|
||||
log "Installing Plymouth..."
|
||||
sudo pacman -S --noconfirm --needed plymouth
|
||||
|
||||
# ── Ensure conversion tools ───────────────────────────────────────────────────
|
||||
# imagemagick is always needed for the spinner dot.
|
||||
# librsvg (rsvg-convert) is only needed when the logo source is an SVG.
|
||||
if ! command -v convert &>/dev/null; then
|
||||
log "Installing imagemagick (dot generation)..."
|
||||
sudo pacman -S --noconfirm --needed imagemagick
|
||||
fi
|
||||
|
||||
# ── Produce logo.png ──────────────────────────────────────────────────────────
|
||||
TMP_LOGO="$(mktemp /tmp/plymouth-logo.XXXXXX.png)"
|
||||
TMP_DOT="/tmp/plymouth-dot.png"
|
||||
trap 'rm -f "$TMP_LOGO" "$TMP_DOT"' EXIT
|
||||
|
||||
if [[ -z "$LOGO_SRC" ]]; then
|
||||
warn "No logo source found — using transparent placeholder."
|
||||
convert -size 300x300 xc:transparent "$TMP_LOGO"
|
||||
elif [[ "${LOGO_SRC,,}" == *.png ]]; then
|
||||
log "Using PNG directly: $LOGO_SRC"
|
||||
cp "$LOGO_SRC" "$TMP_LOGO"
|
||||
else
|
||||
# SVG (or unknown) — convert via rsvg-convert for best fidelity
|
||||
if ! command -v rsvg-convert &>/dev/null; then
|
||||
log "Installing librsvg (rsvg-convert) for SVG→PNG conversion..."
|
||||
sudo pacman -S --noconfirm --needed librsvg
|
||||
fi
|
||||
log "Converting $LOGO_SRC → PNG (300 px wide)..."
|
||||
rsvg-convert -w 300 "$LOGO_SRC" -o "$TMP_LOGO"
|
||||
fi
|
||||
|
||||
# ── Generate spinner dot ──────────────────────────────────────────────────────
|
||||
# 10×10 magenta circle — centred at (5,5), radius 4 px
|
||||
convert -size 10x10 xc:transparent \
|
||||
-fill '#E40046' \
|
||||
-draw 'circle 5,5 5,1' \
|
||||
"$TMP_DOT"
|
||||
|
||||
# ── Install theme files ───────────────────────────────────────────────────────
|
||||
log "Installing M-Archy Plymouth theme..."
|
||||
sudo mkdir -p "$THEME_DIR"
|
||||
sudo cp "$TMP_LOGO" "$THEME_DIR/logo.png"
|
||||
sudo cp "$TMP_DOT" "$THEME_DIR/dot.png"
|
||||
|
||||
sudo tee "$THEME_DIR/m-archy.plymouth" > /dev/null <<'EOF'
|
||||
[Plymouth Theme]
|
||||
Name=M-Archy
|
||||
Description=M-Archy boot splash — skull logo with spinning dots
|
||||
ModuleName=script
|
||||
|
||||
[script]
|
||||
ImageDir=/usr/share/plymouth/themes/m-archy
|
||||
ScriptFile=/usr/share/plymouth/themes/m-archy/m-archy.script
|
||||
EOF
|
||||
|
||||
sudo tee "$THEME_DIR/m-archy.script" > /dev/null <<'EOF'
|
||||
# M-Archy Plymouth splash — skull logo + magenta spinner
|
||||
|
||||
Window.SetBackgroundTopColor (0.10, 0.10, 0.10);
|
||||
Window.SetBackgroundBottomColor (0.07, 0.07, 0.07);
|
||||
|
||||
screen_width = Window.GetWidth ();
|
||||
screen_height = Window.GetHeight ();
|
||||
|
||||
# Centred skull logo
|
||||
logo.image = Image ("logo.png");
|
||||
logo.sprite = Sprite (logo.image);
|
||||
logo.sprite.SetX (Math.Int (screen_width / 2 - logo.image.GetWidth () / 2));
|
||||
logo.sprite.SetY (Math.Int (screen_height / 2 - logo.image.GetHeight () / 2));
|
||||
logo.sprite.SetZ (10);
|
||||
|
||||
# 12-dot spinner below the logo
|
||||
num_dots = 12;
|
||||
dot_r = 5;
|
||||
orbit = 35;
|
||||
cx = screen_width / 2;
|
||||
cy = screen_height / 2 + logo.image.GetHeight () / 2 + 55;
|
||||
dot.image = Image ("dot.png");
|
||||
|
||||
for (i = 0; i < num_dots; i++) {
|
||||
dot[i].sprite = Sprite (dot.image);
|
||||
dot[i].sprite.SetZ (20);
|
||||
}
|
||||
|
||||
frame = 0;
|
||||
|
||||
fun refresh_callback () {
|
||||
frame++;
|
||||
step = 2 * Math.Pi / num_dots;
|
||||
for (i = 0; i < num_dots; i++) {
|
||||
angle = step * i + frame * 0.15;
|
||||
dot[i].sprite.SetX (Math.Int (cx + Math.Cos (angle) * orbit - dot_r));
|
||||
dot[i].sprite.SetY (Math.Int (cy + Math.Sin (angle) * orbit - dot_r));
|
||||
t = (i + Math.Int (frame / 4) % num_dots) % num_dots;
|
||||
f = t / num_dots;
|
||||
dot[i].sprite.SetOpacity (0.15 + 0.85 * f * f);
|
||||
}
|
||||
}
|
||||
|
||||
Plymouth.SetRefreshFunction (refresh_callback);
|
||||
EOF
|
||||
|
||||
# ── Register theme ────────────────────────────────────────────────────────────
|
||||
log "Registering m-archy as default Plymouth theme..."
|
||||
sudo plymouth-set-default-theme m-archy
|
||||
|
||||
# ── mkinitcpio: inject Plymouth hook ─────────────────────────────────────────
|
||||
log "Adding Plymouth hook to /etc/mkinitcpio.conf..."
|
||||
if grep -q '\bplymouth\b\|sd-plymouth' /etc/mkinitcpio.conf; then
|
||||
skip "Plymouth hook already present in mkinitcpio.conf"
|
||||
else
|
||||
# systemd hook → sd-plymouth goes after systemd
|
||||
# traditional udev hook → plymouth goes after udev
|
||||
if grep -qE 'HOOKS=\([^)]*\bsystemd\b' /etc/mkinitcpio.conf; then
|
||||
sudo sed -Ei 's/(\bsystemd\b)( |\))/\1 sd-plymouth\2/' /etc/mkinitcpio.conf
|
||||
log "Injected sd-plymouth hook after systemd"
|
||||
else
|
||||
sudo sed -Ei 's/(\budev\b)( |\))/\1 plymouth\2/' /etc/mkinitcpio.conf
|
||||
log "Injected plymouth hook after udev"
|
||||
fi
|
||||
|
||||
if ! grep -q '\bplymouth\b\|sd-plymouth' /etc/mkinitcpio.conf; then
|
||||
warn "Could not auto-inject Plymouth hook."
|
||||
warn "Manually add 'plymouth' after 'udev' in /etc/mkinitcpio.conf."
|
||||
fi
|
||||
fi
|
||||
|
||||
# ── GRUB: add quiet splash ────────────────────────────────────────────────────
|
||||
GRUB_CONF="/etc/default/grub"
|
||||
if [[ -f "$GRUB_CONF" ]]; then
|
||||
if grep -q '\bsplash\b' "$GRUB_CONF"; then
|
||||
skip "'splash' already present in $GRUB_CONF"
|
||||
else
|
||||
log "Adding 'quiet splash' to GRUB_CMDLINE_LINUX_DEFAULT..."
|
||||
sudo sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT="\(.*\)"/GRUB_CMDLINE_LINUX_DEFAULT="\1 quiet splash"/' "$GRUB_CONF"
|
||||
sudo sed -i 's/quiet quiet/quiet/g' "$GRUB_CONF"
|
||||
fi
|
||||
log "Regenerating GRUB config..."
|
||||
sudo grub-mkconfig -o /boot/grub/grub.cfg
|
||||
else
|
||||
warn "/etc/default/grub not found."
|
||||
warn "If using systemd-boot, add 'quiet splash' to your loader entry manually."
|
||||
fi
|
||||
|
||||
# ── Rebuild initramfs ─────────────────────────────────────────────────────────
|
||||
log "Rebuilding initramfs (this bakes the theme into the initrd)..."
|
||||
sudo mkinitcpio -P
|
||||
|
||||
log "Plymouth m-archy theme installed. Reboot to see the splash screen."
|
||||
|
|
@ -152,10 +152,11 @@ count_steps() {
|
|||
local c="$1" de="$2" a="${3:-}"
|
||||
TOTAL=0
|
||||
# Base components: each keyword maps to exactly one module script.
|
||||
[[ "$c" == *"pkg"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$c" == *"core"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$c" == *"svc"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$c" == *"shell"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$c" == *"pkg"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$c" == *"core"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$c" == *"svc"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$c" == *"shell"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$c" == *"plymouth"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
# A non-"none" DE selection always installs exactly one DE module.
|
||||
[[ "$de" != "none" ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
# Optional app modules: one glob check per app, one increment per match.
|
||||
|
|
@ -395,11 +396,12 @@ else
|
|||
# Esc / Cancel returns exit code 1; the '|| { ...; exit 0; }' treats that as a clean abort.
|
||||
COMPONENTS=$(dialog --backtitle "$BACKTITLE" \
|
||||
--title " Select Components " \
|
||||
--checklist "Space toggles · Enter confirms · Esc quits" 15 68 4 \
|
||||
"pkg" "Package managers yay · nvm · rust" on \
|
||||
"core" "Core packages 100+ base system packages" on \
|
||||
"svc" "Core services NetworkManager · cronie · fail2ban" on \
|
||||
"shell" "Shell setup zsh · nvim · yazi · micro · starship" on \
|
||||
--checklist "Space toggles · Enter confirms · Esc quits" 16 68 5 \
|
||||
"pkg" "Package managers yay · nvm · rust" on \
|
||||
"core" "Core packages 100+ base system packages" on \
|
||||
"svc" "Core services NetworkManager · cronie · fail2ban" on \
|
||||
"shell" "Shell setup zsh · nvim · yazi · micro · starship" on \
|
||||
"plymouth" "Plymouth boot splash — skull logo + spinner" on \
|
||||
3>&1 1>&2 2>&3) || { clear; echo "Aborted."; exit 0; }
|
||||
fi
|
||||
|
||||
|
|
@ -539,10 +541,11 @@ if ! $ANSWERFILE_MODE; then
|
|||
# user can review the full list before any changes are made to the system.
|
||||
SUMMARY=""
|
||||
[[ -n "$HOSTNAME_SET" ]] && SUMMARY+=" ✦ Hostname: $HOSTNAME_SET\n"
|
||||
[[ "$COMPONENTS" == *"pkg"* ]] && SUMMARY+=" ✦ Package managers (yay, nvm, rust)\n"
|
||||
[[ "$COMPONENTS" == *"core"* ]] && SUMMARY+=" ✦ Core packages\n"
|
||||
[[ "$COMPONENTS" == *"svc"* ]] && SUMMARY+=" ✦ Core services\n"
|
||||
[[ "$COMPONENTS" == *"shell"* ]] && SUMMARY+=" ✦ Shell setup\n"
|
||||
[[ "$COMPONENTS" == *"pkg"* ]] && SUMMARY+=" ✦ Package managers (yay, nvm, rust)\n"
|
||||
[[ "$COMPONENTS" == *"core"* ]] && SUMMARY+=" ✦ Core packages\n"
|
||||
[[ "$COMPONENTS" == *"svc"* ]] && SUMMARY+=" ✦ Core services\n"
|
||||
[[ "$COMPONENTS" == *"shell"* ]] && SUMMARY+=" ✦ Shell setup\n"
|
||||
[[ "$COMPONENTS" == *"plymouth"* ]] && SUMMARY+=" ✦ Plymouth boot splash\n"
|
||||
[[ "$DE" != "none" && "$DE" != "" ]] && SUMMARY+=" ✦ Desktop environment: $DE\n"
|
||||
[[ "$SHELL_RC" == "dotfiles" ]] && SUMMARY+=" ✦ Shell rc files → /etc/skel (dotfiles)\n" \
|
||||
|| SUMMARY+=" ✦ Shell rc files → /etc/skel (system defaults)\n"
|
||||
|
|
@ -639,10 +642,11 @@ count_steps "$COMPONENTS" "$DE" "$SELECTED_APPS"
|
|||
# ── Installation: base components ─────────────────────────────────────────────
|
||||
# Each guard uses glob matching against the space-separated COMPONENTS string.
|
||||
# Order matters: package managers must be installed before packages that need yay/rust.
|
||||
[[ "$COMPONENTS" == *"pkg"* ]] && run_module "Package Managers" "$MODULES/package-managers.sh"
|
||||
[[ "$COMPONENTS" == *"core"* ]] && run_module "Core Packages" "$MODULES/core-packages.sh"
|
||||
[[ "$COMPONENTS" == *"svc"* ]] && run_module "Core Services" "$MODULES/core.sh"
|
||||
[[ "$COMPONENTS" == *"shell"* ]] && run_module "Shell Setup" "$MODULES/shell-setup.sh"
|
||||
[[ "$COMPONENTS" == *"pkg"* ]] && run_module "Package Managers" "$MODULES/package-managers.sh"
|
||||
[[ "$COMPONENTS" == *"core"* ]] && run_module "Core Packages" "$MODULES/core-packages.sh"
|
||||
[[ "$COMPONENTS" == *"svc"* ]] && run_module "Core Services" "$MODULES/core.sh"
|
||||
[[ "$COMPONENTS" == *"shell"* ]] && run_module "Shell Setup" "$MODULES/shell-setup.sh"
|
||||
[[ "$COMPONENTS" == *"plymouth"* ]] && run_module "Plymouth" "$MODULES/optional-Modules/plymouth.sh"
|
||||
|
||||
# Route the single selected DE value to its corresponding install script.
|
||||
# "none" is the skip sentinel — no case branch matches it intentionally.
|
||||
|
|
|
|||
Loading…
Reference in New Issue