mirror of
https://github.com/vinceliuice/grub2-themes.git
synced 2025-04-04 16:42:57 +02:00
Added a new abstract theme which is based on Vimix
Changes: Added a new abstract theme which based on Vimix. Fixes: Fixed a tiny bug in the StylishDark install script.
This commit is contained in:
47
grub-theme-slaze/Install
Executable file
47
grub-theme-slaze/Install
Executable file
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Slaze - Grub2 Abstract Theme
|
||||
|
||||
ROOT_UID=0
|
||||
|
||||
# Welcome message
|
||||
echo -e "\n\t**********************************\n\t* Slaze - Grub2 Abstract Theme *\n\t**********************************"
|
||||
|
||||
# Check command avalibility
|
||||
function has_command() {
|
||||
command -v $1 > /dev/null
|
||||
}
|
||||
|
||||
echo -e "\nChecking for root access..."
|
||||
|
||||
# Checking for root access and proceed if it is present
|
||||
if [ "$UID" -eq "$ROOT_UID" ]; then
|
||||
|
||||
# Create themes directory if not exists
|
||||
echo -e "Checking for the existence of themes directory..."
|
||||
mkdir -p /boot/grub/themes
|
||||
|
||||
# Copy Slaze
|
||||
echo -e "Installing Slaze theme..."
|
||||
cp -a Slaze /boot/grub/themes
|
||||
|
||||
# Set Slaze
|
||||
echo -e "Setting Slaze as default..."
|
||||
grep "GRUB_THEME=" /etc/default/grub 2>&1 >/dev/null && sed -i '/GRUB_THEME=/d' /etc/default/grub
|
||||
echo "GRUB_THEME=\"/boot/grub/themes/Slaze/theme.txt\"" >> /etc/default/grub
|
||||
|
||||
# Update grub config
|
||||
echo -e "Updating grub config..."
|
||||
if has_command update-grub; then
|
||||
update-grub
|
||||
elif has_command grub-mkconfig; then
|
||||
grub-mkconfig -o /boot/grub/grub.cfg
|
||||
fi
|
||||
|
||||
# Success message
|
||||
echo -e "\n\t ***************\n\t * All done! *\n\t ***************\n"
|
||||
|
||||
else
|
||||
# Error message
|
||||
echo -e "\n\t ******************************\n\t * Error! -> Run me as root *\n\t ******************************\n"
|
||||
fi
|
Reference in New Issue
Block a user