final tweak before merging to main... I think I am happy now with this

This commit is contained in:
JaKooLit
2025-02-03 12:05:06 +09:00
parent 63f2f45866
commit 8c71bdeee7
3 changed files with 16 additions and 16 deletions

View File

@@ -53,14 +53,16 @@ else
echo "Nvidia modules added in /etc/mkinitcpio.conf"
fi
printf "\n%.0s" {1..2}
printf "${INFO} Rebuilding ${YELLOW}Initramfs${RESET}...\n" 2>&1 | tee -a "$LOG"
sudo mkinitcpio -P 2>&1 | tee -a "$LOG"
printf "\n%.0s" {1..3}
printf "\n%.0s" {1..2}
# Additional Nvidia steps
NVEA="/etc/modprobe.d/nvidia.conf"
if [ -f "$NVEA" ]; then
printf "${OK} Seems like ${YELLOW}nvidia-drm modeset=1${RESET} is already added in your system..moving on."
printf "${OK} Seems like ${YELLOW}nvidia_drm modeset=1 fbdev=1${RESET} is already added in your system..moving on."
printf "\n"
else
printf "\n"
@@ -71,7 +73,7 @@ fi
# Additional for GRUB users
if [ -f /etc/default/grub ]; then
printf "${INFO} GRUB bootloader detected\n" 2>&1 | tee -a "$LOG"
printf "${INFO} ${YELLOW}GRUB${RESET} bootloader detected\n" 2>&1 | tee -a "$LOG"
# Check if nvidia-drm.modeset=1 is present
if ! sudo grep -q "nvidia-drm.modeset=1" /etc/default/grub; then
@@ -88,15 +90,15 @@ if [ -f /etc/default/grub ]; then
# Regenerate GRUB configuration
if sudo grep -q "nvidia-drm.modeset=1" /etc/default/grub || sudo grep -q "nvidia_drm.fbdev=1" /etc/default/grub; then
sudo grub-mkconfig -o /boot/grub/grub.cfg
printf "GRUB configuration regenerated\n" 2>&1 | tee -a "$LOG"
printf "${YELLOW}GRUB${RESET} configuration regenerated\n" 2>&1 | tee -a "$LOG"
fi
printf "${OK} Additional steps for GRUB completed\n" 2>&1 | tee -a "$LOG"
printf "${OK} Additional steps for ${YELLOW}GRUB${RESET} completed\n" 2>&1 | tee -a "$LOG"
fi
# Additional for systemd-boot users
if [ -f /boot/loader/loader.conf ]; then
printf "${INFO} systemd-boot bootloader detected\n" 2>&1 | tee -a "$LOG"
printf "${INFO} ${YELLOW}systemd-boot${RESET} bootloader detected\n" 2>&1 | tee -a "$LOG"
backup_count=$(find /boot/loader/entries/ -type f -name "*.conf.bak" | wc -l)
conf_count=$(find /boot/loader/entries/ -type f -name "*.conf" | wc -l)
@@ -112,9 +114,9 @@ if [ -f /boot/loader/loader.conf ]; then
sudo sed -i "/^options/c${sdopt} nvidia-drm.modeset=1 nvidia_drm.fbdev=1" "$imgconf" 2>&1 | tee -a "$LOG"
done
printf "${OK} Additional steps for systemd-boot completed\n" 2>&1 | tee -a "$LOG"
printf "${OK} Additional steps for ${YELLOW}systemd-boot${RESET} completed\n" 2>&1 | tee -a "$LOG"
else
printf "${NOTE} systemd-boot is already configured...\n" 2>&1 | tee -a "$LOG"
printf "${NOTE} ${YELLOW}systemd-boot${RESET} is already configured...\n" 2>&1 | tee -a "$LOG"
fi
fi
@@ -128,7 +130,7 @@ echo
if [[ $blacklist_nouveau =~ ^[Yy]$ ]]; then
NOUVEAU="/etc/modprobe.d/nouveau.conf"
if [ -f "$NOUVEAU" ]; then
printf "${OK} Seems like nouveau is already blacklisted..moving on.\n"
printf "${OK} Seems like ${YELLOW}nouveau${RESET} is already blacklisted..moving on.\n"
else
echo "blacklist nouveau" | sudo tee -a "$NOUVEAU" 2>&1 | tee -a "$LOG"
printf "${NOTE} has been added to $NOUVEAU.\n"

View File

@@ -6,7 +6,7 @@ if [[ $USE_PRESET = [Yy] ]]; then
source ./preset.sh
fi
zsh=(
zsh_pkg=(
eza
zsh
zsh-completions
@@ -33,7 +33,7 @@ while true; do
fi
case "$pokemon_choice" in
[Yy]*)
zsh+=('pokemon-colorscripts-git')
zsh_pkg+=('pokemon-colorscripts-git')
sed -i '/#pokemon-colorscripts --no-title -s -r/s/^#//' assets/.zshrc >> "$LOG" 2>&1
# commenting out fastfetch since pokemon was chosen to install
@@ -53,16 +53,15 @@ done
# Installing zsh packages
printf "${NOTE} Installing core zsh packages...${RESET}\n"
for ZSH in "${zsh[@]}"; do
for ZSH in "${zsh_pkg[@]}"; do
(
# Call the global install_package function and redirect its output to the log
install_package "$ZSH" "$LOG"
if [ $? -ne 0 ]; then
echo -e "\e[1A\e[K${ERROR} - $ZSH Package installation failed, Please check the installation logs"
exit 1
fi
) &
done
wait # Ensure all background processes finish before continuing
wait
# Install Oh My Zsh, plugins, and set zsh as default shell
if command -v zsh >/dev/null; then