From d3f0016158253c5eb9f47b58c304d8c9399f31fc Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 3 Feb 2025 01:28:27 +0900 Subject: [PATCH] Final tweak. I hope so :) --- install-scripts/01-hypr-pkgs.sh | 2 +- install-scripts/Global_functions.sh | 17 +++++++---------- install-scripts/InputGroup.sh | 2 +- install-scripts/ags.sh | 2 +- install-scripts/bluetooth.sh | 2 +- install-scripts/dotfiles-main.sh | 4 ++-- install-scripts/gtk_themes.sh | 2 +- install-scripts/hyprland.sh | 2 +- install-scripts/nvidia.sh | 16 ++++++++-------- install-scripts/paru.sh | 2 +- install-scripts/pipewire.sh | 2 +- install-scripts/sddm.sh | 4 ++-- install-scripts/thunar.sh | 4 ++-- install-scripts/xdph.sh | 1 + install-scripts/yay.sh | 2 +- install-scripts/zsh.sh | 8 ++++---- 16 files changed, 35 insertions(+), 37 deletions(-) diff --git a/install-scripts/01-hypr-pkgs.sh b/install-scripts/01-hypr-pkgs.sh index c0776fe..baa6b53 100755 --- a/install-scripts/01-hypr-pkgs.sh +++ b/install-scripts/01-hypr-pkgs.sh @@ -111,7 +111,7 @@ fi # Installation of main components -printf "\n%s - Installing hyprland packages.... \n" "${NOTE}" +printf "\n%s - Installing ${BLUE}KooL's hyprland necessary packages${RESET} .... \n" "${NOTE}" for PKG1 in "${hypr_package[@]}" "${hypr_package_2[@]}" "${Extra[@]}"; do install_package "$PKG1" "$LOG" diff --git a/install-scripts/Global_functions.sh b/install-scripts/Global_functions.sh index 13dda1a..bb0ff7e 100755 --- a/install-scripts/Global_functions.sh +++ b/install-scripts/Global_functions.sh @@ -25,24 +25,23 @@ if [ ! -d Install-Logs ]; then mkdir Install-Logs fi -# Function that would show a progress bar to the user on one line +# Function that would show a progress bar show_progress() { local pid=$1 local package_name=$2 local dots="" # Print initial message only once - echo -n "${NOTE} Installing ${YELLOW}$package_name${RESET} ..." - + echo -ne "${NOTE} Installing ${YELLOW}$package_name${RESET} ..." + # Loop until the process is running while ps -p $pid &> /dev/null; do dots+="." - echo -ne "\r${NOTE} Installing ${YELLOW}$package_name${RESET} ...$dots" # Update the same line with dots + printf "\r%-80s" "${NOTE} Installing ${YELLOW}$package_name${RESET} ...$dots" sleep 1 done - # After the process finishes, show "Done!" on the same line - echo -ne "\r${NOTE} Installing ${YELLOW}$package_name${RESET} ...$dots Done!" # Replace dots with Done! + printf "\r%-80s\n" "${NOTE} Installing ${YELLOW}$package_name${RESET} ... Done!" } @@ -57,7 +56,7 @@ install_package_pacman() { stdbuf -oL sudo pacman -S --noconfirm --needed "$1" 2>&1 ) >> "$LOG" 2>&1 & PID=$! - show_progress $PID "$1" # Show progress bar while the process runs + show_progress $PID "$1" # Double check if package is installed if pacman -Q "$1" &>/dev/null ; then @@ -82,7 +81,7 @@ install_package() { stdbuf -oL $ISAUR -S --noconfirm --needed "$1" 2>&1 ) >> "$LOG" 2>&1 & PID=$! - show_progress $PID "$1" # Show progress bar while the process runs + show_progress $PID "$1" # Double check if package is installed if $ISAUR -Q "$1" &>> /dev/null ; then @@ -111,8 +110,6 @@ uninstall_package() { echo -e "\e[1A\e[K${ERROR} $pkg failed to uninstall. Please check the log." return 1 fi - else - echo -e "${NOTE} $pkg is not installed, skipping uninstallation." fi return 0 } \ No newline at end of file diff --git a/install-scripts/InputGroup.sh b/install-scripts/InputGroup.sh index f140c12..e201d41 100755 --- a/install-scripts/InputGroup.sh +++ b/install-scripts/InputGroup.sh @@ -21,7 +21,7 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_input.log" while true; do echo "${WARN} This script will add your ${YELLOW}user${RESET} to the ${MAGENTA}input${RESET} group." - echo "${NOTE} Please note that adding yourself to the ${MAGENTA}input${RESET} group might be necessary for waybar keyboard-state functionality." + echo "${NOTE} Please note that adding yourself to the ${MAGENTA}input${RESET} group might be necessary for ${MAGENTA}waybar keyboard-state functionality${RESET} ." printf "\n%.0s" {1..1} diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index e4382e5..ca6415e 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -42,7 +42,7 @@ MLOG="install-$(date +%d-%H%M%S)_ags2.log" printf "\n%.0s" {1..1} # Installation of main components -printf "\n%s - Installing AGS Dependencies \n" "${NOTE}" +printf "\n%s - Installing ${BLUE}Aylur's GTK shell $ags_tag${RESET} Dependencies \n" "${NOTE}" # Installing ags Dependencies for PKG1 in "${ags[@]}"; do diff --git a/install-scripts/bluetooth.sh b/install-scripts/bluetooth.sh index 4dda529..94e2c22 100755 --- a/install-scripts/bluetooth.sh +++ b/install-scripts/bluetooth.sh @@ -27,7 +27,7 @@ printf "${NOTE} Installing ${BLUE}Bluetooth${RESET} Packages...\n" install_package "$BLUE" "$LOG" done -printf " Activating Bluetooth Services...\n" +printf " Activating ${YELLOW}Bluetooth${RESET} Services...\n" sudo systemctl enable --now bluetooth.service 2>&1 | tee -a "$LOG" printf "\n%.0s" {1..2} \ No newline at end of file diff --git a/install-scripts/dotfiles-main.sh b/install-scripts/dotfiles-main.sh index 09807b6..cbf0ec8 100755 --- a/install-scripts/dotfiles-main.sh +++ b/install-scripts/dotfiles-main.sh @@ -7,7 +7,7 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Check if Hyprland-Dots exists -printf "${NOTE} Downloading ${BLUE}KooL's Hyprland Dots${RESET}....\n" +printf "${NOTE} Cloning and Installing ${BLUE}KooL's Hyprland Dots${RESET}....\n" if [ -d Hyprland-Dots ]; then cd Hyprland-Dots @@ -22,7 +22,7 @@ else chmod +x copy.sh ./copy.sh else - echo -e "$ERROR Can't download Hyprland-Dots" + echo -e "$ERROR Can't download ${YELLOW}KooL's Hyprland-Dots${RESET} . Check your internet connection" fi fi diff --git a/install-scripts/gtk_themes.sh b/install-scripts/gtk_themes.sh index ec5f64d..947e2ed 100755 --- a/install-scripts/gtk_themes.sh +++ b/install-scripts/gtk_themes.sh @@ -36,7 +36,7 @@ if [ -d "GTK-themes-icons" ]; then rm -rf "GTK-themes-icons" 2>&1 | tee -a "$LOG" fi -echo "$NOTE Cloning GTK themes and Icons repository..." 2>&1 | tee -a "$LOG" +echo "$NOTE Cloning ${BLUE}GTK themes and Icons${RESET} repository..." 2>&1 | tee -a "$LOG" if git clone --depth 1 https://github.com/JaKooLit/GTK-themes-icons.git ; then cd GTK-themes-icons chmod +x auto-extract.sh diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index 3c541af..7bf2956 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -34,7 +34,7 @@ if pacman -Qs hyprland >/dev/null; then fi # Hyprland -printf "${NOTE} Installing Hyprland .......\n" +printf "${NOTE} Installing ${BLUE}Hyprland packages${RESET} .......\n" for HYPR in "${hypr[@]}"; do install_package "$HYPR" "$LOG" [ $? -ne 0 ] && { diff --git a/install-scripts/nvidia.sh b/install-scripts/nvidia.sh index dfa4f16..c7f36cf 100755 --- a/install-scripts/nvidia.sh +++ b/install-scripts/nvidia.sh @@ -60,7 +60,7 @@ printf "\n%.0s" {1..3} # Additional Nvidia steps NVEA="/etc/modprobe.d/nvidia.conf" if [ -f "$NVEA" ]; then - printf "${OK} Seems like nvidia-drm modeset=1 is already added in your system..moving on." + printf "${OK} Seems like ${YELLOW}nvidia-drm modeset=1${RESET} is already added in your system..moving on." printf "\n" else printf "\n" @@ -71,7 +71,7 @@ fi # Additional for GRUB users if [ -f /etc/default/grub ]; then - printf "GRUB bootloader detected\n" 2>&1 | tee -a "$LOG" + printf "${INFO} GRUB 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 @@ -91,12 +91,12 @@ if [ -f /etc/default/grub ]; then printf "GRUB configuration regenerated\n" 2>&1 | tee -a "$LOG" fi - printf "Additional steps for GRUB completed\n" 2>&1 | tee -a "$LOG" + printf "${OK} Additional steps for GRUB completed\n" 2>&1 | tee -a "$LOG" fi # Additional for systemd-boot users if [ -f /boot/loader/loader.conf ]; then - printf "systemd-boot bootloader detected\n" 2>&1 | tee -a "$LOG" + printf "${INFO} systemd-boot 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 +112,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 "Additional steps for systemd-boot completed\n" 2>&1 | tee -a "$LOG" + printf "${OK} Additional steps for systemd-boot completed\n" 2>&1 | tee -a "$LOG" else - printf "systemd-boot is already configured...\n" 2>&1 | tee -a "$LOG" + printf "${NOTE} systemd-boot is already configured...\n" 2>&1 | tee -a "$LOG" fi fi @@ -122,7 +122,7 @@ printf "\n%.0s" {1..2} # Blacklist nouveau if [[ -z $blacklist_nouveau ]]; then - read -n1 -rep "${CAT} Would you like to blacklist nouveau? (y/n)" blacklist_nouveau + read -n1 -rep "${CAT} Would you like to ${YELLOW}blacklist nouveau${RESET}? (y/n)" blacklist_nouveau fi echo if [[ $blacklist_nouveau =~ ^[Yy]$ ]]; then @@ -142,7 +142,7 @@ if [[ $blacklist_nouveau =~ ^[Yy]$ ]]; then fi fi else - printf "${NOTE} Skipping nouveau blacklisting..." 2>&1 | tee -a "$LOG" + printf "${NOTE} Skipping ${YELLOW}nouveau blacklisting${RESET} ..." 2>&1 | tee -a "$LOG" fi printf "\n%.0s" {1..2} \ No newline at end of file diff --git a/install-scripts/paru.sh b/install-scripts/paru.sh index ab175d3..29c1522 100755 --- a/install-scripts/paru.sh +++ b/install-scripts/paru.sh @@ -40,7 +40,7 @@ if [ -n "$ISAUR" ]; then printf "\n%s - AUR helper already installed, moving on..\n" "${OK}" else printf "\n%s - AUR helper was NOT located\n" "$WARN" - printf "\n%s - Installing ${YELLOW}paru-bin${RESET} from AUR\n" "${NOTE}" + printf "\n%s - Installing ${BLUE}paru-bin${RESET} from AUR\n" "${NOTE}" git clone https://aur.archlinux.org/paru-bin.git || { printf "%s - Failed to clone ${YELLOW}paru-bin${RESET} from AUR\n" "${ERROR}"; exit 1; } cd paru-bin || { printf "%s - Failed to enter paru directory\n" "${ERROR}"; exit 1; } makepkg -si --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to install ${YELLOW}paru-bin${RESET} from AUR\n" "${ERROR}"; exit 1; } diff --git a/install-scripts/pipewire.sh b/install-scripts/pipewire.sh index d3c7322..0906dd7 100755 --- a/install-scripts/pipewire.sh +++ b/install-scripts/pipewire.sh @@ -30,7 +30,7 @@ echo -e "${NOTE} Disabling pulseaudio to avoid conflicts..." systemctl --user disable --now pulseaudio.socket pulseaudio.service 2>&1 | tee -a "$LOG" # Pipewire -echo -e "${NOTE} Installing Pipewire Packages..." +echo -e "${NOTE} Installing ${BLUE}Pipewire${RESET} Packages..." for PIPEWIRE in "${pipewire[@]}"; do install_package "$PIPEWIRE" "$LOG" [ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $PIPEWIRE Package installation failed, Please check the installation logs"; exit 1; } diff --git a/install-scripts/sddm.sh b/install-scripts/sddm.sh index 24c6d03..8cf0a5e 100755 --- a/install-scripts/sddm.sh +++ b/install-scripts/sddm.sh @@ -59,10 +59,10 @@ printf "\n%.0s" {1..2} valid_input=false while [ "$valid_input" != true ]; do if [[ -z $install_sddm_theme ]]; then - read -n 1 -r -p "${CAT} OPTIONAL - Would you like to install additional SDDM themes? (y/n)" install_sddm_theme + read -n 1 -r -p "${CAT} OPTIONAL - Would you like to install ${YELLOW}additional SDDM themes?${RESET} (y/n)" install_sddm_theme fi if [[ $install_sddm_theme =~ ^[Yy]$ ]]; then - printf "\n%s - Installing Simple SDDM Theme\n" "${NOTE}" + printf "\n%s - Installing ${BLUE}Simple SDDM Theme${RESET}\n" "${NOTE}" # Check if /usr/share/sddm/themes/simple-sddm-2 exists and remove if it does if [ -d "/usr/share/sddm/themes/simple-sddm-2" ]; then diff --git a/install-scripts/thunar.sh b/install-scripts/thunar.sh index af557cc..8492f6d 100755 --- a/install-scripts/thunar.sh +++ b/install-scripts/thunar.sh @@ -39,7 +39,7 @@ printf "${NOTE} Installing ${BLUE}Thunar${RESET} Packages...\n\n" printf "\n%.0s" {1..2} # confirm if wanted to set as default -read -p "${CAT} Do you want to set Thunar as the default file manager? (y/n): " thunar_default +read -p "${CAT} Do you want to set ${MAGENTA}Thunar${RESET} as the default file manager? (y/n): " thunar_default if [[ "$thunar_default" == [Yy] ]]; then xdg-mime default thunar.desktop inode/directory @@ -58,7 +58,7 @@ for DIR1 in gtk-3.0 Thunar xfce4; do echo -e "${NOTE} Config for $DIR1 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" - cp -r assets/$DIR1 ~/.config/ && echo "Copy $DIR1 completed!" || echo "Error: Failed to copy $DIR1 config files." 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/xdph.sh b/install-scripts/xdph.sh index b021b91..9d3d3a8 100755 --- a/install-scripts/xdph.sh +++ b/install-scripts/xdph.sh @@ -27,6 +27,7 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" LOG="Install-Logs/install-$(date +%d-%H%M%S)_xdph.log" # XDG-DESKTOP-PORTAL-HYPRLAND +printf "${NOTE} Installing ${BLUE}xdg-desktop-portal-hyprland${RESET}\n\n" for xdgs in "${xdg[@]}"; do install_package "$xdgs" "$LOG" if [ $? -ne 0 ]; then diff --git a/install-scripts/yay.sh b/install-scripts/yay.sh index 53b8d22..39740ce 100755 --- a/install-scripts/yay.sh +++ b/install-scripts/yay.sh @@ -38,7 +38,7 @@ if [ -n "$ISAUR" ]; then printf "\n%s - AUR helper already installed, moving on.\n" "${OK}" else printf "\n%s - AUR helper was NOT located\n" "$WARN" - printf "\n%s - Installing ${YELLOW}yay${RESET} from AUR\n" "${NOTE}" + printf "\n%s - Installing ${BLUE}yay${RESET} from AUR\n" "${NOTE}" git clone https://aur.archlinux.org/yay.git || { printf "%s - Failed to clone ${YELLOW}yay${RESET} from AUR\n" "${ERROR}"; exit 1; } cd yay || { printf "%s - Failed to enter yay directory\n" "${ERROR}"; exit 1; } makepkg -si --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to install ${YELLOW}yay${RESET} from AUR\n" "${ERROR}"; exit 1; } diff --git a/install-scripts/zsh.sh b/install-scripts/zsh.sh index bc6b2db..d8ea707 100755 --- a/install-scripts/zsh.sh +++ b/install-scripts/zsh.sh @@ -29,7 +29,7 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_zsh.log" ## Optional Pokemon color scripts while true; do if [[ -z $pokemon_choice ]]; then - read -p "${CAT} OPTIONAL - Do you want to add Pokemon color scripts? (y/n): " pokemon_choice + read -p "${CAT} OPTIONAL - Do you want to add ${YELLOW}Pokemon color scripts${RESET}? (y/n): " pokemon_choice fi case "$pokemon_choice" in [Yy]*) @@ -98,13 +98,13 @@ if command -v zsh >/dev/null; then cp -r 'assets/.zshrc' ~/ cp -r 'assets/.zprofile' ~/ - printf "${NOTE} Changing default shell to zsh...\n" - + printf "${NOTE} Changing default shell to ${MAGENTA}zsh${RESET}..." + printf "\n%.0s" {1..2} while ! chsh -s $(which zsh); do echo "${ERROR} Authentication failed. Please enter the correct password." 2>&1 | tee -a "$LOG" sleep 1 done - printf "${NOTE} Shell changed successfully to zsh.\n" 2>&1 | tee -a "$LOG" + printf "${NOTE} Shell changed successfully to ${MAGENTA}zsh${RESET}" 2>&1 | tee -a "$LOG" fi