mirror of
https://github.com/basecamp/omarchy.git
synced 2025-07-27 12:19:24 +00:00
Skip configuration if plymouth was already installed
This helps us skip the installer if something else on initial all failed and we need to run things again.
This commit is contained in:
@ -4,8 +4,8 @@
|
||||
echo "Installing Plymouth..."
|
||||
yay -S --noconfirm --needed plymouth
|
||||
|
||||
# Skip if plymouth already exists for some reason
|
||||
if ! grep -q "^HOOKS=.*plymouth" /etc/mkinitcpio.conf; then
|
||||
if ! command -v plymouth &>/dev/null; then
|
||||
# Skip if plymouth already exists for some reason
|
||||
# Backup original mkinitcpio.conf just in case
|
||||
backup_timestamp=$(date +"%Y%m%d%H%M%S")
|
||||
sudo cp /etc/mkinitcpio.conf "/etc/mkinitcpio.conf.bak.${backup_timestamp}"
|
||||
@ -18,15 +18,12 @@ if ! grep -q "^HOOKS=.*plymouth" /etc/mkinitcpio.conf; then
|
||||
else
|
||||
echo "Couldn't add the Plymouth hook"
|
||||
fi
|
||||
else
|
||||
echo "Plymouth already present in mkinitcpio.conf HOOKS"
|
||||
fi
|
||||
|
||||
# Regenerate initramfs
|
||||
sudo mkinitcpio -P
|
||||
# Regenerate initramfs
|
||||
sudo mkinitcpio -P
|
||||
|
||||
# Add kernel parameters for Plymouth (systemd-boot only)
|
||||
if [ -d "/boot/loader/entries" ]; then
|
||||
# Add kernel parameters for Plymouth (systemd-boot only)
|
||||
if [ -d "/boot/loader/entries" ]; then
|
||||
echo "Detected systemd-boot"
|
||||
|
||||
for entry in /boot/loader/entries/*.conf; do
|
||||
@ -45,7 +42,7 @@ if [ -d "/boot/loader/entries" ]; then
|
||||
fi
|
||||
fi
|
||||
done
|
||||
elif [ -f "/etc/default/grub" ]; then
|
||||
elif [ -f "/etc/default/grub" ]; then
|
||||
# Backup GRUB config before modifying
|
||||
backup_timestamp=$(date +"%Y%m%d%H%M%S")
|
||||
sudo cp /etc/default/grub "/etc/default/grub.bak.${backup_timestamp}"
|
||||
@ -74,15 +71,16 @@ elif [ -f "/etc/default/grub" ]; then
|
||||
else
|
||||
echo "GRUB already configured with splash kernel parameters"
|
||||
fi
|
||||
else
|
||||
else
|
||||
echo ""
|
||||
echo "Neither systemd-boot nor GRUB detected. Please manually add these kernel parameters:"
|
||||
echo " - splash (to see the graphical splash screen)"
|
||||
echo " - quiet (for silent boot)"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Copy and set the Plymouth theme
|
||||
sudo cp -r "$HOME/.local/share/omarchy/default/plymouth" /usr/share/plymouth/themes/omarchy/
|
||||
|
||||
sudo plymouth-set-default-theme -R omarchy
|
||||
fi
|
||||
|
||||
# Copy and set the Plymouth theme
|
||||
sudo cp -r "$HOME/.local/share/omarchy/default/plymouth" /usr/share/plymouth/themes/omarchy/
|
||||
|
||||
sudo plymouth-set-default-theme -R omarchy
|
||||
|
Reference in New Issue
Block a user