From 3fea28e2253a95e904cb108d1b7f5932edeba1b6 Mon Sep 17 00:00:00 2001 From: Sir Blob Date: Thu, 24 Sep 2026 03:28:32 +0000 Subject: [PATCH] Set the boot splash to blob_boot.png during install --- README.md | 2 +- bin/blob-boot | 2 +- docs/install.md | 7 ++++++- docs/packages.md | 15 +++++++-------- install.sh | 2 ++ install/steps/boot.sh | 37 +++++++++++++++++++++++++++++++++++++ install/steps/services.sh | 9 +++++---- 7 files changed, 59 insertions(+), 15 deletions(-) create mode 100644 install/steps/boot.sh diff --git a/README.md b/README.md index 9df5133..92b4b79 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ It runs these steps, in this order, and every one of them is idempotent: | 5. First theme | links `~/wallpapers` to the checkout, applies `flats` headless, picks a background, and links the btop and Neovim theme files, so the first login is not a blank desktop | | 6. User units | installs the session services into `~/.config/systemd/user` and enables them | | 7. systemd drop-ins | writes the shutdown timeouts, oomd thresholds, plocate prune paths, and sleep hooks under `/etc` | -| 8. System services | enables NetworkManager, resolved, bluetooth, cups, avahi, docker, power-profiles-daemon, and oomd, and masks `NetworkManager-wait-online` | +| 8. System services | enables NetworkManager, resolved, bluetooth, cups, avahi, docker, power-profiles-daemon, and oomd, masks `NetworkManager-wait-online`, and sets the boot splash to `branding/blob_boot.png` | | 9. Login screen | installs the session entry and the SDDM config, enables `sddm.service`, and sets the default target to `graphical.target` | | 10. Reload | reloads systemd, restarts the running user services, and in a running session re-renders the theme, reloads Hyprland, and restarts the Blob shell | | 11. Launch | starts the login screen, so the desktop comes up without a reboot | diff --git a/bin/blob-boot b/bin/blob-boot index 80095d1..c1450fc 100755 --- a/bin/blob-boot +++ b/bin/blob-boot @@ -19,7 +19,7 @@ set -euo pipefail BLOB_PATH="${BLOB_PATH:-$HOME/.local/share/blob}" -DEFAULT_IMAGE="$BLOB_PATH/branding/boot_flash.png" +DEFAULT_IMAGE="$BLOB_PATH/branding/blob_boot.png" THEME_SOURCE="$BLOB_PATH/default/plymouth" THEME_DIR="/usr/share/plymouth/themes/blob" PLYMOUTH_LOGO="$THEME_DIR/logo.png" diff --git a/docs/install.md b/docs/install.md index d530ca3..3fdf56e 100644 --- a/docs/install.md +++ b/docs/install.md @@ -15,6 +15,7 @@ with `--check`. | `install/steps/packages.sh` | repo and AUR packages, and the yay bootstrap | | `install/steps/config.sh` | the `BLOB_PATH` symlink, everything under `~/.config`, and the login shell profile | | `install/steps/services.sh` | system services, systemd drop-ins, user units | +| `install/steps/boot.sh` | the Plymouth boot splash | | `install/steps/theme.sh` | the wallpaper link, the first theme, the first background | | `install/steps/login.sh` | SDDM, the session entry, and the first launch | | `install/steps/reload.sh` | reloading systemd, the user services, and a running session | @@ -78,7 +79,11 @@ with `--check`. hold up the login screen, and `plymouth-start.service` and `plymouth-quit-wait.service` are masked because an unconfigured plymouth holds the console and leaves the machine with neither a greeter nor a TTY. - `blob boot` unmasks them when it sets the splash up. See + The installer then applies `branding/blob_boot.png` as the boot splash + through `blob boot`, which installs the theme, adds the mkinitcpio hook, + unmasks the plymouth units and rebuilds the initramfs. It is skipped when + the blob theme is already the default with the same image, and once it is + in place the plymouth units are no longer masked on later runs. See [packages.md](packages.md#the-boot-splash). 9. **The login screen** is SDDM. It has to be installed first: if `sddm.service` is not there, the installer says whether the package is diff --git a/docs/packages.md b/docs/packages.md index be2d030..40e2be6 100644 --- a/docs/packages.md +++ b/docs/packages.md @@ -138,19 +138,18 @@ Omarchy's own package list, because they were installed by hand on this machine: ## The boot splash -`plymouth` is installed but left inert, and the splash is opt-in through one -command: +`install.sh` sets the splash to `branding/blob_boot.png`. To change it later: ``` -blob boot # branding/boot_flash.png +blob boot # branding/blob_boot.png blob boot ~/some/image.png # or any other image ``` -The reason it is opt-in is that an installed but *unconfigured* plymouth is not -harmless: it takes the console at boot and never hands it back, and -`getty@tty1` waits on `plymouth-quit-wait.service`, so the machine reaches -neither the greeter nor a TTY. `install.sh` therefore masks -`plymouth-start.service` and `plymouth-quit-wait.service`, and `blob boot` +An installed but *unconfigured* plymouth is not harmless: it takes the console +at boot and never hands it back, and `getty@tty1` waits on +`plymouth-quit-wait.service`, so the machine reaches neither the greeter nor a +TTY. `install.sh` therefore masks `plymouth-start.service` and +`plymouth-quit-wait.service` until the splash is configured, and `blob boot` unmasks them as part of configuring everything else - the theme in `default/plymouth/`, the `plymouth` mkinitcpio hook, and the initramfs rebuild. It finishes by printing the kernel parameters your bootloader still needs diff --git a/install.sh b/install.sh index 59a9555..f86e283 100755 --- a/install.sh +++ b/install.sh @@ -49,6 +49,7 @@ source "$repo_dir/install/steps/directories.sh" source "$repo_dir/install/steps/packages.sh" source "$repo_dir/install/steps/config.sh" source "$repo_dir/install/steps/services.sh" +source "$repo_dir/install/steps/boot.sh" source "$repo_dir/install/steps/theme.sh" source "$repo_dir/install/steps/login.sh" source "$repo_dir/install/steps/reload.sh" @@ -80,6 +81,7 @@ link_app_themes enable_system_services mask_system_services +install_boot_splash enable_user_units install_login_config diff --git a/install/steps/boot.sh b/install/steps/boot.sh new file mode 100644 index 0000000..2c4eead --- /dev/null +++ b/install/steps/boot.sh @@ -0,0 +1,37 @@ +boot_splash_image="$repo_dir/branding/blob_boot.png" +boot_splash_theme_dir="/usr/share/plymouth/themes/blob" + +boot_splash_installed() { + command -v plymouth-set-default-theme &>/dev/null || return 1 + [[ -f $boot_splash_theme_dir/blob.plymouth ]] || return 1 + [[ "$(plymouth-set-default-theme 2>/dev/null)" == blob ]] +} + +install_boot_splash() { + if ! command -v plymouth-set-default-theme &>/dev/null; then + say "SKIP boot splash (plymouth not installed)" + return 0 + fi + + if [[ ! -f $boot_splash_image ]]; then + say "SKIP boot splash (branding/blob_boot.png missing)" + return 0 + fi + + if boot_splash_installed && cmp -s "$boot_splash_image" "$boot_splash_theme_dir/logo.png"; then + say "ok boot splash" + return 0 + fi + + note_change + if [[ $check == true ]]; then + say "would set the boot splash to branding/blob_boot.png and rebuild the initramfs" + return 0 + fi + + if BLOB_PATH="$blob_path" "$repo_dir/bin/blob-boot" "$boot_splash_image"; then + say "set boot splash to branding/blob_boot.png" + else + say "WARN could not set the boot splash; run 'blob boot' to retry" + fi +} diff --git a/install/steps/services.sh b/install/steps/services.sh index 77c2b6f..f3b5149 100644 --- a/install/steps/services.sh +++ b/install/steps/services.sh @@ -12,10 +12,10 @@ system_services=( # network-online.target must not hold up graphical.target waiting for DHCP or # Wi-Fi association. Nothing in the session blocks on the network. # -# Blob configures no boot splash: no mkinitcpio hook, no kernel command line, -# and no theme. An unconfigured plymouth still takes the console at boot and -# never hands it back, and getty@tty1 waits on plymouth-quit-wait.service, so -# the machine comes up with no greeter and no TTY to fix it from. +# An unconfigured plymouth takes the console at boot and never hands it back, +# and getty@tty1 waits on plymouth-quit-wait.service, so the machine comes up +# with no greeter and no TTY to fix it from. The plymouth units are masked +# until install_boot_splash configures the blob theme, and left alone after. masked_services=( NetworkManager-wait-online.service plymouth-start.service @@ -64,6 +64,7 @@ mask_system_services() { for unit in "${masked_services[@]}"; do system_unit_exists "$unit" || continue + [[ $unit == plymouth-* ]] && boot_splash_installed && continue [[ "$(system_unit_state "$unit")" == masked ]] && continue pending+=("$unit") done