From 528551ea86433f6fc36feab298a37da5d84839c3 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 3 Feb 2025 12:25:10 +0900 Subject: [PATCH] There are still some other things you see on final test :) BUT, Im quite ok with this --- install-scripts/Global_functions.sh | 7 +++---- install-scripts/hyprland.sh | 2 +- install-scripts/nvidia.sh | 6 +++--- install-scripts/thunar.sh | 4 ++-- install-scripts/zsh.sh | 18 +++++++++++++----- 5 files changed, 22 insertions(+), 15 deletions(-) diff --git a/install-scripts/Global_functions.sh b/install-scripts/Global_functions.sh index 1f93f61..ce3a0fe 100755 --- a/install-scripts/Global_functions.sh +++ b/install-scripts/Global_functions.sh @@ -51,8 +51,7 @@ show_progress() { install_package_pacman() { # Check if package is already installed if pacman -Q "$1" &>/dev/null ; then - echo -e "${OK} ${MAGENTA}$1${RESET} is already installed. Skipping..." - printf "\n%.0s" {1..1} + echo -e "${INFO} ${MAGENTA}$1${RESET} is already installed. Skipping..." else # Run pacman and redirect all output to a log file ( @@ -77,7 +76,7 @@ ISAUR=$(command -v yay || command -v paru) install_package() { # Checking if package is already installed if $ISAUR -Q "$1" &>> /dev/null ; then - echo -e "${OK} ${MAGENTA}$1${RESET} is already installed. Skipping..." + echo -e "${INFO} ${MAGENTA}$1${RESET} is already installed. Skipping..." else # Run yay/paru and redirect all output to a log file ( @@ -114,7 +113,7 @@ uninstall_package() { return 1 fi else - echo -e "${NOTE} Package $pkg not installed, skipping." + echo -e "${INFO} Package $pkg not installed, skipping." fi return 0 } \ No newline at end of file diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index 4f42548..d7b774c 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -27,7 +27,7 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Removing other Hyprland to avoid conflict printf "${YELLOW} Checking for other hyprland packages and remove if any..${RESET}\n" if pacman -Qs hyprland >/dev/null; then - printf "${YELLOW} Hyprland detected. uninstalling to install Hyprland-git...${RESET}\n" + printf "${YELLOW} Hyprland detected. attempting to uninstall to install Hyprland from official repo...${RESET}\n" for hyprnvi in hyprland-git hyprland-nvidia hyprland-nvidia-git hyprland-nvidia-hidpi-git; do sudo pacman -R --noconfirm "$hyprnvi" 2>/dev/null | tee -a "$LOG" || true done diff --git a/install-scripts/nvidia.sh b/install-scripts/nvidia.sh index b714854..14f6082 100755 --- a/install-scripts/nvidia.sh +++ b/install-scripts/nvidia.sh @@ -53,11 +53,11 @@ else echo "Nvidia modules added in /etc/mkinitcpio.conf" fi -printf "\n%.0s" {1..2} +printf "\n%.0s" {1..1} printf "${INFO} Rebuilding ${YELLOW}Initramfs${RESET}...\n" 2>&1 | tee -a "$LOG" sudo mkinitcpio -P 2>&1 | tee -a "$LOG" -printf "\n%.0s" {1..2} +printf "\n%.0s" {1..1} # Additional Nvidia steps NVEA="/etc/modprobe.d/nvidia.conf" @@ -120,7 +120,7 @@ if [ -f /boot/loader/loader.conf ]; then fi fi -printf "\n%.0s" {1..2} +printf "\n%.0s" {1..1} # Blacklist nouveau if [[ -z $blacklist_nouveau ]]; then diff --git a/install-scripts/thunar.sh b/install-scripts/thunar.sh index 0902976..5e1c665 100755 --- a/install-scripts/thunar.sh +++ b/install-scripts/thunar.sh @@ -71,9 +71,9 @@ printf "\n%.0s" {1..1} for DIR1 in gtk-3.0 Thunar xfce4; do DIRPATH=~/.config/$DIR1 if [ -d "$DIRPATH" ]; then - echo -e "${NOTE} Config for $DIR1 found, no need to copy." 2>&1 | tee -a "$LOG" + echo -e "${NOTE} Config for ${MAGENTA}$DIR1${RESET} found, no need to copy." 2>&1 | tee -a "$LOG" else - echo -e "${NOTE} Config for $DIR1 not found, copying from assets." 2>&1 | tee -a "$LOG" + echo -e "${NOTE} Config for ${YELLOW}$DIR1${RESET} not found, copying from assets." 2>&1 | tee -a "$LOG" cp -r assets/$DIR1 ~/.config/ && echo "${OK} Copy $DIR1 completed!" || echo "${ERROR} Failed to copy $DIR1 config files." 2>&1 | tee -a "$LOG" fi done diff --git a/install-scripts/zsh.sh b/install-scripts/zsh.sh index c5da4f5..8dbd843 100755 --- a/install-scripts/zsh.sh +++ b/install-scripts/zsh.sh @@ -33,12 +33,9 @@ while true; do fi case "$pokemon_choice" in [Yy]*) - 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 sed -i '/^fastfetch -c $HOME\/.config\/fastfetch\/config-compact.jsonc/s/^/#/' assets/.zshrc >> "$LOG" 2>&1 - + break ;; [Nn]*) @@ -47,11 +44,12 @@ while true; do ;; *) echo "${WARN}Please enter 'y' for yes or 'n' for no.${RESET}" + pokemon_choice="" ;; esac done -# Installing zsh packages +# Installing core zsh packages printf "${NOTE} Installing core zsh packages...${RESET}\n" for ZSH in "${zsh_pkg[@]}"; do ( @@ -63,6 +61,16 @@ for ZSH in "${zsh_pkg[@]}"; do done wait +# Install the Pokemon color scripts if the user accepted earlier +if [[ "$pokemon_choice" =~ [Yy] ]]; then + echo "${NOTE} Installing ${SKY_BLUE}Pokemon color scripts${RESET} ..." + install_package 'pokemon-colorscripts-git' "$LOG" + if [ $? -ne 0 ]; then + echo "${ERROR} Failed to install ${YELLOW}Pokemon color scripts${RESET} . Please check the log." | tee -a "$LOG" + exit 1 + fi +fi + # Install Oh My Zsh, plugins, and set zsh as default shell if command -v zsh >/dev/null; then printf "${NOTE} Installing Oh My Zsh and plugins...\n"