From 017c9a9ba856a255ec9eb992b08fbd04b5d16335 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Wed, 23 Feb 2022 11:14:06 -0600 Subject: [PATCH] Add mkinitcpio plymouth hook --- scripts/3-post-setup.sh | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/scripts/3-post-setup.sh b/scripts/3-post-setup.sh index f90719a..34c67a0 100755 --- a/scripts/3-post-setup.sh +++ b/scripts/3-post-setup.sh @@ -20,10 +20,18 @@ source ${HOME}/ArchTitus/configs/setup.conf if [[ -d "/sys/firmware/efi" ]]; then grub-install --efi-directory=/boot ${DISK} fi + +echo -ne " +------------------------------------------------------------------------- + Creating (and Theming) Grub Boot Menu +------------------------------------------------------------------------- +" # set kernel parameter for decrypting the drive if [[ "${FS}" == "luks" ]]; then sed -i "s%GRUB_CMDLINE_LINUX_DEFAULT=\"%GRUB_CMDLINE_LINUX_DEFAULT=\"cryptdevice=UUID=${ENCRYPTED_PARTITION_UUID}:ROOT root=/dev/mapper/ROOT %g" /etc/default/grub fi +# set kernel parameter for adding splash screen +sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="[^"]*/& splash /' /etc/default/grub echo -e "Installing CyberRe Grub theme..." THEME_DIR="/boot/grub/themes" @@ -76,16 +84,6 @@ else fi fi -echo -ne " -------------------------------------------------------------------------- - Enabling (and Theming) Plymouth Boot Splash -------------------------------------------------------------------------- -" -PLYMOUTH_THEMES="$HOME/ArchTitus/configs/usr/share/plymouth/themes" -mkdir -p /usr/share/plymouth/themes -cp -rf ${PLYMOUTH_THEMES}/arch-glow /usr/share/plymouth/themes -plymouth-set-default-theme -R arch-glow - echo -ne " ------------------------------------------------------------------------- Enabling Essential Services @@ -122,6 +120,25 @@ cp -rfv ${SNAPPER_CONF_D} /etc/conf.d/ fi +echo -ne " +------------------------------------------------------------------------- + Enabling (and Theming) Plymouth Boot Splash +------------------------------------------------------------------------- +" +PLYMOUTH_THEMES_DIR="$HOME/ArchTitus/configs/usr/share/plymouth/themes" +PLYMOUTH_THEME="arch-glow" # can grab from config later if we allow selection +mkdir -p /usr/share/plymouth/themes +echo 'Installing Plymouth theme...' +cp -rf ${PLYMOUTH_THEMES_DIR}/${PLYMOUTH_THEME} /usr/share/plymouth/themes +if [[ $FS == "luks"]]; then + sed -i 's/HOOKS=(base udev*/& plymouth/' /etc/mkinitcpio.conf # add plymouth after base udev + sed -i 's/HOOKS=(base udev \(.*block\) /&plymouth-/' /etc/mkinitcpio.conf # create plymouth-encrypt after block hook +else + sed -i 's/HOOKS=(base udev*/& plymouth/' /etc/mkinitcpio.conf # add plymouth after base udev +fi +plymouth-set-default-theme -R arch-glow # sets the theme and runs mkinitcpio +echo 'Plymouth theme installed' + echo -ne " ------------------------------------------------------------------------- Cleaning