From c3c4d621ca33738df5bd78d9b5abc92f521d327c Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 27 Feb 2025 16:52:27 +0900 Subject: [PATCH 01/17] adjusted to whiptail version --- install-scripts/00-base.sh | 23 +- install-scripts/01-hypr-pkgs.sh | 11 +- install-scripts/Global_functions.sh | 2 +- install-scripts/InputGroup.sh | 11 +- install-scripts/ags.sh | 11 +- install-scripts/bluetooth.sh | 11 +- install-scripts/dotfiles-main.sh | 8 + install-scripts/fonts.sh | 11 +- install-scripts/gtk_themes.sh | 11 +- install-scripts/hyprland.sh | 15 +- install-scripts/nvidia.sh | 11 +- install-scripts/nvidia_nouveau.sh | 11 +- install-scripts/pacman.sh | 13 +- install-scripts/pipewire.sh | 5 +- install-scripts/rog.sh | 11 +- install-scripts/sddm.sh | 11 +- install-scripts/sddm_theme.sh | 10 +- install-scripts/thunar.sh | 11 +- install-scripts/thunar_default.sh | 11 +- install-scripts/xdph.sh | 11 +- install-scripts/zsh.sh | 11 +- install-scripts/zsh_pokemon.sh | 11 +- install.sh | 450 +++++++++++++++------------- preset.sh | 39 +-- 24 files changed, 438 insertions(+), 292 deletions(-) diff --git a/install-scripts/00-base.sh b/install-scripts/00-base.sh index 366a0af..12b02eb 100755 --- a/install-scripts/00-base.sh +++ b/install-scripts/00-base.sh @@ -1,23 +1,34 @@ #!/bin/bash # šŸ’« https://github.com/JaKooLit šŸ’« # -# base devel + archlinux-keyring # +# base-devel + archlinux-keyring # base=( base-devel archlinux-keyring ) + ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# Change the working directory to the parent directory of the script +PARENT_DIR="$SCRIPT_DIR/.." +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_base.log" - -# Installation of main components -printf "\n%s - Installing ${SKY_BLUE}base-devel${RESET} \n" "${NOTE}" +# Installation of main components with pacman +echo -e "\nInstalling ${SKY_BLUE}base-devel${RESET} and ${SKY_BLUE}archlinux-keyring${RESET}..." for PKG1 in "${base[@]}"; do + echo "Installing $PKG1 with pacman..." install_package_pacman "$PKG1" "$LOG" done -printf "\n%.0s" {1..2} \ No newline at end of file +echo -e "\nInstallation completed. Proceeding with AUR installations (if needed)..." diff --git a/install-scripts/01-hypr-pkgs.sh b/install-scripts/01-hypr-pkgs.sh index d1e0818..1dfd3be 100755 --- a/install-scripts/01-hypr-pkgs.sh +++ b/install-scripts/01-hypr-pkgs.sh @@ -85,14 +85,19 @@ uninstall=( ) ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_hypr-pkgs.log" diff --git a/install-scripts/Global_functions.sh b/install-scripts/Global_functions.sh index 82baafa..a0c2938 100755 --- a/install-scripts/Global_functions.sh +++ b/install-scripts/Global_functions.sh @@ -71,7 +71,6 @@ install_package_pacman() { } ISAUR=$(command -v yay || command -v paru) - # Function to install packages with either yay or paru install_package() { if $ISAUR -Q "$1" &>> /dev/null ; then @@ -110,6 +109,7 @@ install_package_f() { fi } + # Function for removing packages uninstall_package() { local pkg="$1" diff --git a/install-scripts/InputGroup.sh b/install-scripts/InputGroup.sh index 8c5e5b7..b1ea5bf 100755 --- a/install-scripts/InputGroup.sh +++ b/install-scripts/InputGroup.sh @@ -3,14 +3,19 @@ # Adding users into input group # ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_input.log" diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index 44b9edf..66ed6eb 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -26,14 +26,19 @@ ags=( ags_tag="v1.9.0" ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_ags.log" diff --git a/install-scripts/bluetooth.sh b/install-scripts/bluetooth.sh index 52dffb1..677e6de 100755 --- a/install-scripts/bluetooth.sh +++ b/install-scripts/bluetooth.sh @@ -9,14 +9,19 @@ blue=( ) ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_bluetooth.log" diff --git a/install-scripts/dotfiles-main.sh b/install-scripts/dotfiles-main.sh index f7f2a46..9138882 100755 --- a/install-scripts/dotfiles-main.sh +++ b/install-scripts/dotfiles-main.sh @@ -2,8 +2,16 @@ # šŸ’« https://github.com/JaKooLit šŸ’« # # Hyprland-Dots to download from main # + ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# Change the working directory to the parent directory of the script +PARENT_DIR="$SCRIPT_DIR/.." +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Check if Hyprland-Dots exists diff --git a/install-scripts/fonts.sh b/install-scripts/fonts.sh index 7322153..f76c9a0 100755 --- a/install-scripts/fonts.sh +++ b/install-scripts/fonts.sh @@ -20,14 +20,19 @@ fonts=( ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_fonts.log" diff --git a/install-scripts/gtk_themes.sh b/install-scripts/gtk_themes.sh index ad4fe74..f4781b4 100755 --- a/install-scripts/gtk_themes.sh +++ b/install-scripts/gtk_themes.sh @@ -8,15 +8,18 @@ engine=( ) ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## - -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_themes.log" diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index 8dc032e..48cdda3 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -11,19 +11,22 @@ hypr=( ) ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## - -# Determine the directory where the script is located -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_hyprland.log" -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 diff --git a/install-scripts/nvidia.sh b/install-scripts/nvidia.sh index f43ed8b..9e190cb 100755 --- a/install-scripts/nvidia.sh +++ b/install-scripts/nvidia.sh @@ -12,14 +12,19 @@ nvidia_pkg=( ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_nvidia.log" diff --git a/install-scripts/nvidia_nouveau.sh b/install-scripts/nvidia_nouveau.sh index 82e5413..cf84323 100755 --- a/install-scripts/nvidia_nouveau.sh +++ b/install-scripts/nvidia_nouveau.sh @@ -3,14 +3,19 @@ # Nvidia Blacklist # ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_nvidia.log" diff --git a/install-scripts/pacman.sh b/install-scripts/pacman.sh index f0dca86..914c4fe 100755 --- a/install-scripts/pacman.sh +++ b/install-scripts/pacman.sh @@ -3,7 +3,18 @@ # pacman adding up extra-spices # ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# Change the working directory to the parent directory of the script +PARENT_DIR="$SCRIPT_DIR/.." +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_pacman.log" diff --git a/install-scripts/pipewire.sh b/install-scripts/pipewire.sh index 5f5f791..0ddbc65 100755 --- a/install-scripts/pipewire.sh +++ b/install-scripts/pipewire.sh @@ -18,14 +18,13 @@ pipewire_2=( ) ############## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ############## -# Set some colors for output messages -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } +# Source the global functions script source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time diff --git a/install-scripts/rog.sh b/install-scripts/rog.sh index 6a3c07a..130fcbd 100755 --- a/install-scripts/rog.sh +++ b/install-scripts/rog.sh @@ -10,14 +10,19 @@ rog=( ) ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_rog.log" diff --git a/install-scripts/sddm.sh b/install-scripts/sddm.sh index 4a9d703..2439b72 100755 --- a/install-scripts/sddm.sh +++ b/install-scripts/sddm.sh @@ -19,14 +19,19 @@ login=( ) ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_sddm.log" diff --git a/install-scripts/sddm_theme.sh b/install-scripts/sddm_theme.sh index bc41d23..847f15e 100755 --- a/install-scripts/sddm_theme.sh +++ b/install-scripts/sddm_theme.sh @@ -6,14 +6,18 @@ source_theme="https://codeberg.org/JaKooLit/sddm-sequoia" theme_name="sequoia_2" ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_sddm_theme.log" diff --git a/install-scripts/thunar.sh b/install-scripts/thunar.sh index b6dc809..1b01614 100755 --- a/install-scripts/thunar.sh +++ b/install-scripts/thunar.sh @@ -12,15 +12,18 @@ thunar=( ) ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## - -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_thunar.log" diff --git a/install-scripts/thunar_default.sh b/install-scripts/thunar_default.sh index 576e76c..219e1c3 100755 --- a/install-scripts/thunar_default.sh +++ b/install-scripts/thunar_default.sh @@ -4,14 +4,19 @@ ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_thunar-default.log" diff --git a/install-scripts/xdph.sh b/install-scripts/xdph.sh index 1952270..f140955 100755 --- a/install-scripts/xdph.sh +++ b/install-scripts/xdph.sh @@ -9,15 +9,18 @@ xdg=( ) ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## - -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_xdph.log" diff --git a/install-scripts/zsh.sh b/install-scripts/zsh.sh index 98fa562..72264ad 100755 --- a/install-scripts/zsh.sh +++ b/install-scripts/zsh.sh @@ -14,14 +14,19 @@ zsh_pkg2=( ) ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_zsh.log" diff --git a/install-scripts/zsh_pokemon.sh b/install-scripts/zsh_pokemon.sh index fcacf12..712431a 100755 --- a/install-scripts/zsh_pokemon.sh +++ b/install-scripts/zsh_pokemon.sh @@ -3,14 +3,19 @@ # pokemon-color-scripts# ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -# Determine the directory where the script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script PARENT_DIR="$SCRIPT_DIR/.." -cd "$PARENT_DIR" || exit 1 +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_zsh_pokemon.log" diff --git a/install.sh b/install.sh index ff52a97..06c0a6c 100755 --- a/install.sh +++ b/install.sh @@ -71,97 +71,51 @@ echo -e "\e[35m \e[0m" printf "\n%.0s" {1..1} -# Welcome message -echo "${SKY_BLUE}Welcome to JaKooLit's Arch-Hyprland (2025) Install Script!${RESET}" -echo -echo "${WARNING}ATTENTION: Run a full system update and Reboot first!! (Highly Recommended) ${RESET}" -echo -echo "${YELLOW}NOTE: You will be required to answer some questions during the installation! ${RESET}" -echo -echo "${YELLOW}NOTE: If you are installing on a VM, ensure to enable 3D acceleration else Hyprland wont start! ${RESET}" -echo +# Welcome message using whiptail (for displaying information) +whiptail --title "KooL Arch-Hyprland (2025) Install Script" \ + --msgbox "Welcome to KooL Arch-Hyprland (2025) Install Script!!!\n\n\ +ATTENTION: Run a full system update and Reboot first !!! (Highly Recommended)\n\n\ +NOTE: If you are installing on a VM, ensure to enable 3D acceleration else Hyprland may NOT start!" \ + 15 80 -read -p "${SKY_BLUE}Would you like to proceed? (y/n): ${RESET}" proceed - -if [ "$proceed" != "y" ]; then - printf "\n%.0s" {1..2} - echo "${INFO} Installation aborted. ${SKY_BLUE}No changes in your system.${RESET} ${YELLOW}Goodbye!${RESET}" - printf "\n%.0s" {1..2} +# Ask if the user wants to proceed +if ! whiptail --title "Proceed with Installation?" \ + --yesno "Would you like to proceed?" 7 50; then + echo -e "\n\n" + echo "${INFO} - You chose ${YELLOW}NOT${RESET} to proceed. Exiting..." + echo -e "\n\n" exit 1 fi +# If they choose "Yes" (1), the script continues +echo "${OK} - ${MAGENTA}KooL${RESET}.. lets continue with the installation..." + printf "\n%.0s" {1..1} # install pciutils if detected not installed. Necessary for detecting GPU if ! pacman -Qs pciutils > /dev/null; then - echo "pciutils is not installed. Installing..." + echo "${NOTE} - pciutils is not installed. Installing..." sudo pacman -S --noconfirm pciutils printf "\n%.0s" {1..1} fi -# Function to colorize prompts -colorize_prompt() { - local color="$1" - local message="$2" - echo -n "${color}${message}$(tput sgr0)" -} +if ! command -v whiptail >/dev/null; then + echo "${NOTE} - whiptail is not installed. Installing..." + sudo pacman -S --noconfirm whiptail + printf "\n%.0s" {1..1} +fi # Set the name of the log file to include the current date and time LOG="install-$(date +%d-%H%M%S).log" - # Create Directory for Install Logs if [ ! -d Install-Logs ]; then mkdir Install-Logs fi -# Define the directory where your scripts are located +# Path to the install-scripts directory script_directory=install-scripts -# Function to ask a yes/no question and set the response in a variable -ask_yes_no() { - if [[ ! -z "${!2}" ]]; then - echo "$(colorize_prompt "$CAT" "$1 (Preset): ${!2}")" - if [[ "${!2}" = [Yy] ]]; then - return 0 - else - return 1 - fi - else - eval "$2=''" - fi - while true; do - read -p "$(colorize_prompt "$CAT" "$1 (y/n): ")" choice - case "$choice" in - [Yy]* ) eval "$2='Y'"; return 0;; - [Nn]* ) eval "$2='N'"; return 1;; - * ) echo "Please answer with y or n.";; - esac - done -} - -# Function to ask a custom question with specific options and set the response in a variable -ask_custom_option() { - local prompt="$1" - local valid_options="$2" - local response_var="$3" - - if [[ ! -z "${!3}" ]]; then - return 0 - else - eval "$3=''" - fi - - while true; do - read -p "$(colorize_prompt "$CAT" "$prompt ($valid_options): ")" choice - if [[ " $valid_options " == *" $choice "* ]]; then - eval "$response_var='$choice'" - return 0 - else - echo "Please choose one of the provided options: $valid_options" - fi - done -} # Function to execute a script if it exists and make it executable execute_script() { local script="$1" @@ -169,7 +123,7 @@ execute_script() { if [ -f "$script_path" ]; then chmod +x "$script_path" if [ -x "$script_path" ]; then - env USE_PRESET=$use_preset "$script_path" + env "$script_path" else echo "Failed to make script '$script' executable." fi @@ -178,181 +132,275 @@ execute_script() { fi } -# Collect user responses to all questions -# Check if nvidia is present -if lspci | grep -i "nvidia" &> /dev/null; then - printf "\n" - printf "${INFO} ${YELLOW}NVIDIA GPU${RESET} detected in your system \n" - printf "${NOTE} Script will install ${YELLOW}nvidia-dkms nvidia-utils and nvidia-settings${RESET} \n" - ask_yes_no "-Do you want script to configure ${YELLOW}NVIDIA${RESET} for you?" nvidia +################# +# Default values for the options (will be overwritten by preset file if available) +gtk_themes="OFF" +bluetooth="OFF" +thunar="OFF" +ags="OFF" +sddm="OFF" +sddm_theme="OFF" +xdph="OFF" +zsh="OFF" +pokemon="OFF" +rog="OFF" +dots="OFF" +input_group="OFF" +nvidia="OFF" +nouveau="OFF" + +# Function to load preset file +load_preset() { + if [ -f "$1" ]; then + # Source the preset file + source "$1" + echo "${NOTE} - Preset file loaded successfully." + else + echo "${INFO} - Preset file not found. Using default values." + fi +} + +# Check if --preset argument is passed +if [[ "$1" == "--preset" && -n "$2" ]]; then + load_preset "$2" fi -if [[ "$nvidia" == "Y" ]]; then - ask_yes_no "-Would you like to ${YELLOW}blacklist nouveau?${RESET}" nouveau -fi -# AUR helper -if ! command -v yay &>/dev/null && ! command -v paru &>/dev/null; then - printf "\n" - ask_custom_option "-Which ${YELLOW}AUR helper${RESET} would you like to use? (paru or yay): " "paru or yay" aur_helper -fi +# List of services to check for active login managers +services=("gdm.service" "gdm3.service" "lightdm.service" "lxdm.service") -printf "\n" -ask_yes_no "-Install ${YELLOW}GTK themes${RESET} (required for Dark/Light function)?" gtk_themes - -printf "\n" -ask_yes_no "-Do you want to configure ${YELLOW}Bluetooth${RESET}?" bluetooth - -printf "\n" -ask_yes_no "-Do you want to install ${YELLOW}Thunar file manager${RESET}?" thunar - -if [[ "$thunar" == "Y" ]]; then - ask_yes_no "-Set ${YELLOW}Thunar${RESET} as the default file manager?" thunar_choice -fi - -# Input group -printf "\n" -if ! groups "$(whoami)" | grep -q '\binput\b'; then - printf "${NOTE} adding to ${YELLOW}input${RESET} group might be necessary for ${YELLOW}waybar keyboard-state functionality${RESET} \n" - ask_yes_no "-Would you like to be added to the ${YELLOW}input${RESET} group?" input_group -fi - -printf "\n" -printf "${NOTE} ${YELLOW}AGS Desktop Overview DEMO link${RESET} on README\n" -ask_yes_no "-Install ${YELLOW}AGS (aylur's GTK shell) v1${RESET} for Desktop-Like Overview?" ags - -printf "\n" -ask_yes_no "-Install & configure ${YELLOW}SDDM${RESET} as login manager?" sddm -# check if any known login managers are active when users choose to install sddm -if [ "$sddm" == "y" ] || [ "$sddm" == "Y" ]; then - # List of services to check - services=("gdm.service" "gdm3.service" "lightdm.service" "lxdm.service") - - # Loop through each service +# Function to check if any login services are active +check_services_running() { for svc in "${services[@]}"; do if systemctl is-active --quiet "$svc"; then - echo "${ERROR} ${MAGENTA}$svc${RESET} is active. stop or disable it first or ${YELLOW}DO NOT choose SDDM${RESET} to install." - echo "${NOTE} If you have GDM, no need to install SDDM. GDM will work fine as Login Manager for Hyprland." - printf "\n%.0s" {1..2} - exit 1 + return 0 fi done -fi -if [[ "$sddm" == "Y" ]]; then - ask_yes_no "-Download and Install ${YELLOW}SDDM Theme?${RESET} " sddm_theme + return 1 +} + +# Check if yay or paru is installed +echo "${INFO} - Checking if yay or paru is installed" +if ! command -v yay &>/dev/null && ! command -v paru &>/dev/null; then + echo "${CAT} - Neither yay nor paru found. Asking for selection..." + while true; do + aur_helper=$(whiptail --title "Neither Yay nor Paru is installed" --checklist "Choose ONE helper ONLY!\nNOTE: spacebar to select" 10 60 2 \ + "yay" "AUR Helper yay" "OFF" \ + "paru" "AUR Helper paru" "OFF" \ + 3>&1 1>&2 2>&3) + + if [ -z "$aur_helper" ]; then + echo "${OK} - You cancelled the selection. ${YELLOW}Goodbye!${RESET}" + exit 0 + fi + + echo "${INFO} - You selected: $aur_helper as your AUR helper" + + aur_helper=$(echo "$aur_helper" | tr -d '"') + + if [[ -z "$aur_helper" || $(echo "$aur_helper" | wc -w) -ne 1 ]]; then + whiptail --title "Error" --msgbox "You must select at least one AUR helper." 10 60 2 + else + break + fi + done +else + echo "${NOTE} - AUR helper is already installed. Skipping AUR helper selection." fi -printf "\n" -ask_yes_no "-Install ${YELLOW}XDG-DESKTOP-PORTAL-HYPRLAND?${RESET} (For proper Screen Share, e.g., OBS)" xdph - -printf "\n" -ask_yes_no "-Install ${YELLOW}zsh${RESET} with ${YELLOW}oh-my-zsh?${RESET}" zsh - -if [[ "$zsh" == "Y" ]]; then - ask_yes_no "-Add ${YELLOW}Pokemon color scripts?${RESET} in your terminal?" pokemon_choice +# Check if NVIDIA GPU is detected +nvidia_detected=false +if lspci | grep -i "nvidia" &> /dev/null; then + nvidia_detected=true + whiptail --title "NVIDIA GPU Detected" --msgbox "NVIDIA GPU detected in your system.\n\nNOTE: The script will install nvidia-dkms, nvidia-utils, and nvidia-settings if you choose to configure." 12 60 fi -printf "\n" -ask_yes_no "-Installing on ${YELLOW}Asus ROG laptops?${RESET}" rog +# Initialize the options command for whiptail checklist +options_command="whiptail --title 'Select Options' --checklist 'Choose options to install or configure\nNOTE: spacebar to select' 28 85 20" -printf "\n" -ask_yes_no "-Do you want to add pre-configured ${YELLOW}KooL's Hyprland dotfiles?${RESET}" dots +# Add NVIDIA options to the checklist if NVIDIA GPU is detected +if [ "$nvidia_detected" == "true" ]; then + options_command+=" \ + 'nvidia' 'Do you want script to configure NVIDIA GPU?' 'OFF' \ + 'nouveau' 'Do you want Nouveau to be blacklisted?' 'OFF' " +fi -printf "\n" +# Check if user is already in the 'input' group +input_group_detected=false +if ! groups "$(whoami)" | grep -q '\binput\b'; then + input_group_detected=true + whiptail --title "Input Group" --msgbox "You are not currently in the input group.\n\nAdding you to the input group might be necessary for the Waybar keyboard-state functionality." 12 60 +fi + +# Add 'input_group' option if user is not in the 'input' group +if [ "$input_group_detected" == "true" ]; then + options_command+=" \ + 'input_group' 'Add your USER to input group for some waybar functionality?' 'OFF' " +fi + +# Add the rest of your options here (including AUR helper option) +options_command+=" \ + 'gtk_themes' 'Install GTK themes (required for Dark/Light function)' 'OFF' \ + 'bluetooth' 'Do you want script to configure Bluetooth?' 'OFF' \ + 'thunar' 'Do you want Thunar file manager to be installed?' 'OFF' \ + 'ags' 'Install AGS v1 for Desktop-Like Overview' 'OFF' \ + 'sddm' 'Install & configure SDDM login manager?' 'OFF' \ + 'sddm_theme' 'Download & Install Additional SDDM theme?' 'OFF' \ + 'xdph' 'Install XDG-DESKTOP-PORTAL-HYPRLAND (for screen share)?' 'OFF' \ + 'zsh' 'Install zsh shell with Oh-My-Zsh?' 'OFF' \ + 'pokemon' 'Add Pokemon color scripts to your terminal?' 'OFF' \ + 'rog' 'Are you installing on Asus ROG laptops?' 'OFF' \ + 'dots' 'Download and install pre-configured KooL Hyprland dotfiles?' 'OFF'" + +# Execute the options checklist and capture the selected options +selected_options=$(eval "$options_command" 3>&1 1>&2 2>&3) + +# Check if the user pressed Cancel (exit status 1) +if [ $? -ne 0 ]; then + echo "${NOTE} - You cancelled the selection. ${YELLOW}Goodbye!${RESET}" + exit 1 +fi + +# Clean up the selected options (remove quotes and trim spaces) +selected_options=$(echo "$selected_options" | tr -d '"' | tr -s ' ') + +# Convert selected options into an array +IFS=' ' read -r -a options <<< "$selected_options" + +# Prepare Confirmation Message +confirm_message="You have selected the following options:\n\n" +for option in "${options[@]}"; do + confirm_message+=" - $option\n" +done + +confirm_message+="\nDo you want to proceed with these choices?" + +# Show Confirmation Dialog +dialog --title "Confirm Your Choices" --yesno "$confirm_message" 20 80 + +# If the user cancels, show the checklist again +if [ $? -ne 0 ]; then + echo "${NOTE} - You cancelled the confirmation. Returning to option selection..." + exec "$0" +fi + +# If user confirms +echo "${OK} - Proceeding with selected options..." -# Ensuring all in the scripts folder are made executable -chmod +x install-scripts/* - -sleep 1 # Ensuring base-devel is installed execute_script "00-base.sh" sleep 1 execute_script "pacman.sh" sleep 1 -# Execute AUR helper script based on user choice + +# Execute AUR helper script after other installations if applicable if [ "$aur_helper" == "paru" ]; then execute_script "paru.sh" elif [ "$aur_helper" == "yay" ]; then execute_script "yay.sh" fi -# Install hyprland packages +sleep 1 + +# Run the Hyprland related scripts +echo "Installing KooL Hyprland additional packages..." +sleep 1 execute_script "01-hypr-pkgs.sh" -# Install pipewire and pipewire-audio +echo "Installing pipewire and pipewire-audio..." +sleep 1 execute_script "pipewire.sh" -# Install necessary fonts +echo "Installing necessary fonts..." +sleep 1 execute_script "fonts.sh" -# Install hyprland +echo "Installing Hyprland..." +sleep 1 execute_script "hyprland.sh" -if [ "$nvidia" == "Y" ]; then - execute_script "nvidia.sh" -fi -if [ "$nouveau" == "Y" ]; then - execute_script "nvidia_nouveau.sh" -fi +# Clean up the selected options (remove quotes and trim spaces) +selected_options=$(echo "$selected_options" | tr -d '"' | tr -s ' ') -if [ "$gtk_themes" == "Y" ]; then - execute_script "gtk_themes.sh" -fi +# Convert selected options into an array (splitting by spaces) +IFS=' ' read -r -a options <<< "$selected_options" -if [ "$bluetooth" == "Y" ]; then - execute_script "bluetooth.sh" -fi - -if [ "$thunar" == "Y" ]; then - execute_script "thunar.sh" -fi -if [ "$thunar_choice" == "Y" ]; then - execute_script "thunar_default.sh" -fi - -if [ "$ags" == "Y" ]; then - execute_script "ags.sh" -fi - -if [ "$sddm" == "Y" ]; then - execute_script "sddm.sh" -fi -if [ "$sddm_theme" == "Y" ]; then - execute_script "sddm_theme.sh" -fi - -if [ "$xdph" == "Y" ]; then - execute_script "xdph.sh" -fi - -if [ "$zsh" == "Y" ]; then - execute_script "zsh.sh" -fi -if [ "$pokemon_choice" == "Y" ]; then - execute_script "zsh_pokemon.sh" -fi - -if [ "$input_group" == "Y" ]; then - execute_script "InputGroup.sh" -fi - -if [ "$rog" == "Y" ]; then - execute_script "rog.sh" -fi - -if [ "$dots" == "Y" ]; then - execute_script "dotfiles-main.sh" - -fi - -clear +# Loop through selected options +for option in "${options[@]}"; do + case "$option" in + sddm) + if check_services_running; then + # If any log in managers are active + whiptail --title "Error" --msgbox "One of the following login services is running:\n$(IFS=$'\n'; echo "${services[*]}")\n\nPlease stop it or DO not choose SDDM." 12 60 + exec "$0" + else + echo "Installing and configuring SDDM..." + execute_script "sddm.sh" + fi + ;; + nvidia) + echo "Configuring nvidia stuff" + execute_script "nvidia.sh" + ;; + nouveau) + echo "blacklisting nouveau" + execute_script "nvidia_nouveau.sh" + ;; + gtk_themes) + echo "Installing GTK themes..." + execute_script "gtk_themes.sh" + ;; + input_group) + echo "Adding user into input group..." + execute_script "InputGroup.sh" + ;; + ags) + echo "Installing AGS..." + execute_script "ags.sh" + ;; + xdph) + echo "Installing XDG-DESKTOP-PORTAL-HYPRLAND..." + execute_script "xdph.sh" + ;; + bluetooth) + echo "Configuring Bluetooth..." + execute_script "bluetooth.sh" + ;; + thunar) + echo "Installing Thunar file manager..." + execute_script "thunar.sh" + ;; + sddm_theme) + echo "Downloading & Installing Additional SDDM theme..." + execute_script "sddm_theme.sh" + ;; + zsh) + echo "Installing zsh with Oh-My-Zsh..." + execute_script "zsh.sh" + ;; + pokemon) + echo "Adding Pokemon color scripts to terminal..." + execute_script "zsh_pokemon.sh" + ;; + dots) + echo "Installing pre-configured Hyprland dotfiles..." + execute_script "dotfiles-main.sh" + ;; + *) + echo "Unknown option: $option" + ;; + esac +done +sleep 1 # copy fastfetch config if arch.png is not present if [ ! -f "$HOME/.config/fastfetch/arch.png" ]; then cp -r assets/fastfetch "$HOME/.config/" fi +clear + # final check essential packages if it is installed execute_script "02-Final-Check.sh" diff --git a/preset.sh b/preset.sh index 5c79732..40d8904 100644 --- a/preset.sh +++ b/preset.sh @@ -1,55 +1,48 @@ # šŸ’« https://github.com/JaKooLit šŸ’« # -# CREDIT to: https://github.com/PostCyberPunk for this Preset function -## -- Make sure you use the right answer or install script will fail ### -# The rest Change to Y for Yes and N for No. +# Define the options you want to preselect (either ON or OFF) +# IMPORTANT: answer should be inside "" ### Script will install nvidia-dkms nvidia-utils & nvidia-settings ###-Would you like script to Configure NVIDIA for you? -nvidia="N" +nvidia="ON" ### Would you like to blacklist nouveau? (y/n) -nouveau="N" - -### yay or paru -aur_helper="yay" +nouveau="ON" ###-Install GTK themes (required for Dark/Light function)? -gtk_themes="Y" +gtk_themes="ON" ###-Do you want to configure Bluetooth? -bluetooth="Y" +bluetooth="ON" ###-Do you want to install Thunar file manager? -thunar="Y" -### Do you want to set Thunar as the default file manager? -thunar_choice="Y" - +thunar="ON" ### Adding user to the 'input' group might be necessary for waybar keyboard-state functionality -input_group="Y" +input_group="ON" ### Desktop overview Demo Link in README ### Desktop overview Demo Link in README ### Install AGS (aylur's GTK shell) v1 for Desktop-Like Overview?" -ags="Y" +ags="ON" ###-Install & configure SDDM log-in Manager -sddm="Y" +sddm="ON" ### install and download SDDM themes -sddm_theme="Y" +sddm_theme="ON" ###-Install XDG-DESKTOP-PORTAL-HYPRLAND? (For proper Screen Share ie OBS) -xdph="Y" +xdph="ON" ### Shell extension. Bash alternative ###-Install zsh, oh-my-zsh -zsh="Y" +zsh="ON" ### add Pokemon color scripts to terminal -pokemon_choice="Y" +pokemon="ON" ### This will install ASUSCTL & SUPERGFXCTL ###-Installing on Asus ROG Laptops? -rog="N" +rog="ON" ###-Download and Add pre-configured Hyprland dotfiles? -dots="Y" +dots="ON" From aae594ecff09a9132a1acc2fc132c2b9404cfb33 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 27 Feb 2025 16:53:55 +0900 Subject: [PATCH 02/17] minor adjustment on the readme on how to utilize preset.sh --- README.md | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 21fd503..a137be2 100644 --- a/README.md +++ b/README.md @@ -110,20 +110,13 @@ chmod +x install.sh -### 🤟 semi-unattended installation (new for Feb 2025) -- edit preset.sh to modify what packages you want. Make sure to change only with Y or N +### 🤟 semi-unattended installation (new for End of 2025) +- edit preset.sh to modify what packages you want. Make sure to change only with ON or OFF - to use preset instead of usual `./install.sh` you can ran like this ```bash -./install.sh --preset +./install.sh --preset preset.sh ``` - -- if you have nvidia you can add --nvidia argument - -```bash -./install.sh --preset --nvidia -``` - - its called semi-unattended it is because you still have to answer some questions when installing KooL's Hyprland Dots From bf44e13dac5cb38d3af22e0e02ba2b71caa5f446 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 27 Feb 2025 20:44:57 +0900 Subject: [PATCH 03/17] updated --- install-scripts/00-base.sh | 2 +- install.sh | 108 ++++++++++++++++++++----------------- 2 files changed, 59 insertions(+), 51 deletions(-) diff --git a/install-scripts/00-base.sh b/install-scripts/00-base.sh index 12b02eb..911ed7d 100755 --- a/install-scripts/00-base.sh +++ b/install-scripts/00-base.sh @@ -31,4 +31,4 @@ for PKG1 in "${base[@]}"; do install_package_pacman "$PKG1" "$LOG" done -echo -e "\nInstallation completed. Proceeding with AUR installations (if needed)..." +printf "\n%.0s" {1..1} diff --git a/install.sh b/install.sh index 06c0a6c..69e770a 100755 --- a/install.sh +++ b/install.sh @@ -215,14 +215,17 @@ if lspci | grep -i "nvidia" &> /dev/null; then whiptail --title "NVIDIA GPU Detected" --msgbox "NVIDIA GPU detected in your system.\n\nNOTE: The script will install nvidia-dkms, nvidia-utils, and nvidia-settings if you choose to configure." 12 60 fi -# Initialize the options command for whiptail checklist -options_command="whiptail --title 'Select Options' --checklist 'Choose options to install or configure\nNOTE: spacebar to select' 28 85 20" +# Initialize the options array for whiptail checklist +options_command=( + whiptail --title "Select Options" --checklist "Choose options to install or configure\nNOTE: spacebar to select" 28 85 20 +) -# Add NVIDIA options to the checklist if NVIDIA GPU is detected +# Add NVIDIA options if detected if [ "$nvidia_detected" == "true" ]; then - options_command+=" \ - 'nvidia' 'Do you want script to configure NVIDIA GPU?' 'OFF' \ - 'nouveau' 'Do you want Nouveau to be blacklisted?' 'OFF' " + options_command+=( + "nvidia" "Do you want script to configure NVIDIA GPU?" "OFF" + "nouveau" "Do you want Nouveau to be blacklisted?" "OFF" + ) fi # Check if user is already in the 'input' group @@ -232,62 +235,67 @@ if ! groups "$(whoami)" | grep -q '\binput\b'; then whiptail --title "Input Group" --msgbox "You are not currently in the input group.\n\nAdding you to the input group might be necessary for the Waybar keyboard-state functionality." 12 60 fi -# Add 'input_group' option if user is not in the 'input' group +# Add 'input_group' option if necessary if [ "$input_group_detected" == "true" ]; then - options_command+=" \ - 'input_group' 'Add your USER to input group for some waybar functionality?' 'OFF' " + options_command+=( + "input_group" "Add your USER to input group for some waybar functionality?" "OFF" + ) fi -# Add the rest of your options here (including AUR helper option) -options_command+=" \ - 'gtk_themes' 'Install GTK themes (required for Dark/Light function)' 'OFF' \ - 'bluetooth' 'Do you want script to configure Bluetooth?' 'OFF' \ - 'thunar' 'Do you want Thunar file manager to be installed?' 'OFF' \ - 'ags' 'Install AGS v1 for Desktop-Like Overview' 'OFF' \ - 'sddm' 'Install & configure SDDM login manager?' 'OFF' \ - 'sddm_theme' 'Download & Install Additional SDDM theme?' 'OFF' \ - 'xdph' 'Install XDG-DESKTOP-PORTAL-HYPRLAND (for screen share)?' 'OFF' \ - 'zsh' 'Install zsh shell with Oh-My-Zsh?' 'OFF' \ - 'pokemon' 'Add Pokemon color scripts to your terminal?' 'OFF' \ - 'rog' 'Are you installing on Asus ROG laptops?' 'OFF' \ - 'dots' 'Download and install pre-configured KooL Hyprland dotfiles?' 'OFF'" +# Add the remaining static options +options_command+=( + "gtk_themes" "Install GTK themes (required for Dark/Light function)" "OFF" + "bluetooth" "Do you want script to configure Bluetooth?" "OFF" + "thunar" "Do you want Thunar file manager to be installed?" "OFF" + "ags" "Install AGS v1 for Desktop-Like Overview" "OFF" + "sddm" "Install & configure SDDM login manager?" "OFF" + "sddm_theme" "Download & Install Additional SDDM theme?" "OFF" + "xdph" "Install XDG-DESKTOP-PORTAL-HYPRLAND (for screen share)?" "OFF" + "zsh" "Install zsh shell with Oh-My-Zsh?" "OFF" + "pokemon" "Add Pokemon color scripts to your terminal?" "OFF" + "rog" "Are you installing on Asus ROG laptops?" "OFF" + "dots" "Download and install pre-configured KooL Hyprland dotfiles?" "OFF" +) -# Execute the options checklist and capture the selected options -selected_options=$(eval "$options_command" 3>&1 1>&2 2>&3) +while true; do + # Execute the checklist and capture the selected options + selected_options=$("${options_command[@]}" 3>&1 1>&2 2>&3) -# Check if the user pressed Cancel (exit status 1) -if [ $? -ne 0 ]; then - echo "${NOTE} - You cancelled the selection. ${YELLOW}Goodbye!${RESET}" - exit 1 -fi + # Check if the user pressed Cancel (exit status 1) + if [ $? -ne 0 ]; then + echo "āŒ You cancelled the selection. Returning to selection..." + continue # Go back to the selection menu instead of exiting + fi -# Clean up the selected options (remove quotes and trim spaces) -selected_options=$(echo "$selected_options" | tr -d '"' | tr -s ' ') + # If no option was selected, notify and restart the selection + if [ -z "$selected_options" ]; then + whiptail --title "Warning" --msgbox "āš ļø No options were selected. Please select at least one option." 10 60 + continue # Return to selection + fi -# Convert selected options into an array -IFS=' ' read -r -a options <<< "$selected_options" + # Convert selected options into an array (preserving spaces in values) + IFS=' ' read -r -a options <<< "$selected_options" -# Prepare Confirmation Message -confirm_message="You have selected the following options:\n\n" -for option in "${options[@]}"; do - confirm_message+=" - $option\n" + # Prepare Confirmation Message + confirm_message="You have selected the following options:\n\n" + for option in "${options[@]}"; do + confirm_message+=" - $option\n" + done + confirm_message+="\nDo you want to proceed with these choices?" + + # Show the confirmation prompt + if ! whiptail --title "Confirm Your Choices" --yesno "$(printf "%s" "$confirm_message")" 20 80; then + echo "āŒ You cancelled the confirmation. Returning to selection..." + continue # Return to selection + fi + + # If user confirms, break out of the loop and proceed + break done -confirm_message+="\nDo you want to proceed with these choices?" - -# Show Confirmation Dialog -dialog --title "Confirm Your Choices" --yesno "$confirm_message" 20 80 - -# If the user cancels, show the checklist again -if [ $? -ne 0 ]; then - echo "${NOTE} - You cancelled the confirmation. Returning to option selection..." - exec "$0" -fi - -# If user confirms +# Proceed with installation echo "${OK} - Proceeding with selected options..." - # Ensuring base-devel is installed execute_script "00-base.sh" sleep 1 From f0186dec334046811a4266e75a046ee11046038b Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 27 Feb 2025 20:53:19 +0900 Subject: [PATCH 04/17] updated some files --- install.sh | 8 +++----- preset.sh | 6 +++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 69e770a..fde3381 100755 --- a/install.sh +++ b/install.sh @@ -133,7 +133,7 @@ execute_script() { } ################# -# Default values for the options (will be overwritten by preset file if available) +## Default values for the options (will be overwritten by preset file if available) gtk_themes="OFF" bluetooth="OFF" thunar="OFF" @@ -152,11 +152,10 @@ nouveau="OFF" # Function to load preset file load_preset() { if [ -f "$1" ]; then - # Source the preset file + echo "āœ… Loading preset: $1" source "$1" - echo "${NOTE} - Preset file loaded successfully." else - echo "${INFO} - Preset file not found. Using default values." + echo "āš ļø Preset file not found: $1. Using default values." fi } @@ -165,7 +164,6 @@ if [[ "$1" == "--preset" && -n "$2" ]]; then load_preset "$2" fi - # List of services to check for active login managers services=("gdm.service" "gdm3.service" "lightdm.service" "lxdm.service") diff --git a/preset.sh b/preset.sh index 40d8904..cc6f032 100644 --- a/preset.sh +++ b/preset.sh @@ -5,9 +5,9 @@ ### Script will install nvidia-dkms nvidia-utils & nvidia-settings ###-Would you like script to Configure NVIDIA for you? -nvidia="ON" +nvidia="OFF" ### Would you like to blacklist nouveau? (y/n) -nouveau="ON" +nouveau="OFF" ###-Install GTK themes (required for Dark/Light function)? gtk_themes="ON" @@ -42,7 +42,7 @@ pokemon="ON" ### This will install ASUSCTL & SUPERGFXCTL ###-Installing on Asus ROG Laptops? -rog="ON" +rog="OFF" ###-Download and Add pre-configured Hyprland dotfiles? dots="ON" From 07ab9e91475f224da46a234e138407c3a62aa2d4 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 27 Feb 2025 23:45:01 +0900 Subject: [PATCH 05/17] updated --- install.sh | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/install.sh b/install.sh index fde3381..59e0eec 100755 --- a/install.sh +++ b/install.sh @@ -53,9 +53,9 @@ else echo "$NOTE Install base-devel.........." if sudo pacman -S --noconfirm base-devel; then - echo "$OK base-devel has been installed successfully." + echo "šŸ‘Œ ${OK} base-devel has been installed successfully." else - echo "$ERROR base-devel not found nor cannot be installed." + echo "āŒ $ERROR base-devel not found nor cannot be installed." echo "$ACTION Please install base-devel manually before running this script... Exiting" exit 1 fi @@ -81,14 +81,13 @@ NOTE: If you are installing on a VM, ensure to enable 3D acceleration else Hyprl # Ask if the user wants to proceed if ! whiptail --title "Proceed with Installation?" \ --yesno "Would you like to proceed?" 7 50; then - echo -e "\n\n" - echo "${INFO} - You chose ${YELLOW}NOT${RESET} to proceed. Exiting..." - echo -e "\n\n" + echo -e "\n" + echo "āŒ ${INFO} You 🫵 chose ${YELLOW}NOT${RESET} to proceed. ${YELLOW}Exiting...${RESET}" + echo -e "\n" exit 1 fi -# If they choose "Yes" (1), the script continues -echo "${OK} - ${MAGENTA}KooL${RESET}.. lets continue with the installation..." +echo "šŸ‘Œ ${OK} šŸ‡µšŸ‡­ ${MAGENTA}KooL..${RESET} ${SKY_BLUE}lets continue with the installation...${RESET}" printf "\n%.0s" {1..1} @@ -132,7 +131,7 @@ execute_script() { fi } -################# + ## Default values for the options (will be overwritten by preset file if available) gtk_themes="OFF" bluetooth="OFF" @@ -180,7 +179,7 @@ check_services_running() { # Check if yay or paru is installed echo "${INFO} - Checking if yay or paru is installed" if ! command -v yay &>/dev/null && ! command -v paru &>/dev/null; then - echo "${CAT} - Neither yay nor paru found. Asking for selection..." + echo "${CAT} - Neither yay nor paru found. Asking šŸ—£ļø USER to select..." while true; do aur_helper=$(whiptail --title "Neither Yay nor Paru is installed" --checklist "Choose ONE helper ONLY!\nNOTE: spacebar to select" 10 60 2 \ "yay" "AUR Helper yay" "OFF" \ @@ -188,7 +187,7 @@ if ! command -v yay &>/dev/null && ! command -v paru &>/dev/null; then 3>&1 1>&2 2>&3) if [ -z "$aur_helper" ]; then - echo "${OK} - You cancelled the selection. ${YELLOW}Goodbye!${RESET}" + echo "āŒ ${INFO} You 🫵 cancelled the selection. ${YELLOW}Goodbye!${RESET}" exit 0 fi @@ -261,14 +260,15 @@ while true; do # Check if the user pressed Cancel (exit status 1) if [ $? -ne 0 ]; then - echo "āŒ You cancelled the selection. Returning to selection..." - continue # Go back to the selection menu instead of exiting + echo -e "\n" + echo "āŒ ${INFO} You 🫵 cancelled the selection. ${YELLOW}Goodbye!${RESET}" + exit 0 # Exit the script if Cancel is pressed fi # If no option was selected, notify and restart the selection if [ -z "$selected_options" ]; then whiptail --title "Warning" --msgbox "āš ļø No options were selected. Please select at least one option." 10 60 - continue # Return to selection + continue # Return to selection if no options selected fi # Convert selected options into an array (preserving spaces in values) @@ -279,20 +279,21 @@ while true; do for option in "${options[@]}"; do confirm_message+=" - $option\n" done - confirm_message+="\nDo you want to proceed with these choices?" + confirm_message+="\nAre you happy with these choices?" - # Show the confirmation prompt - if ! whiptail --title "Confirm Your Choices" --yesno "$(printf "%s" "$confirm_message")" 20 80; then - echo "āŒ You cancelled the confirmation. Returning to selection..." - continue # Return to selection + # onfirmation prompt + if ! whiptail --title "Confirm Your Choices" --yesno "$(printf "%s" "$confirm_message")" 25 80; then + echo -e "\n" + echo "āŒ ${SKY_BLUE}You 🫵 cancelled the confirmation${RESET}. ${YELLOW}Exiting...${RESET}" + exit 0 fi - # If user confirms, break out of the loop and proceed + echo "šŸ‘Œ ${OK} You confirmed your choices. Proceeding with ${SKY_BLUE}KooL šŸ‡µšŸ‡­ Hyprland Installation...${RESET}" break done # Proceed with installation -echo "${OK} - Proceeding with selected options..." +echo "šŸ‘Œ ${OK} - Proceeding with selected options..." # Ensuring base-devel is installed execute_script "00-base.sh" @@ -414,12 +415,12 @@ printf "\n%.0s" {1..1} # Check if hyprland or hyprland-git is installed if pacman -Q hyprland &> /dev/null || pacman -Q hyprland-git &> /dev/null; then - printf "\n${OK} Hyprland is installed. However, some essential packages may not be installed. Please see above!" + printf "\n ${OK} šŸ‘Œ Hyprland is installed. However, some essential packages may not be installed. Please see above!" printf "\n${CAT} Ignore this message if it states ${YELLOW}All essential packages${RESET} are installed as per above\n" sleep 2 printf "\n%.0s" {1..2} - printf "${SKY_BLUE}Thank you${RESET} for using ${MAGENTA}KooL's Hyprland Dots${RESET}. ${YELLOW}Enjoy and Have a good day!${RESET}" + printf "${SKY_BLUE}Thank you${RESET} 🫰 for using šŸ‡µšŸ‡­ ${MAGENTA}KooL's Hyprland Dots${RESET}. ${YELLOW}Enjoy and Have a good day!${RESET}" printf "\n%.0s" {1..2} printf "\n${NOTE} You can start Hyprland by typing ${SKY_BLUE}Hyprland${RESET} (IF SDDM is not installed) (note the capital H!).\n" @@ -433,7 +434,7 @@ if pacman -Q hyprland &> /dev/null || pacman -Q hyprland-git &> /dev/null; then echo "${INFO} Rebooting now..." systemctl reboot elif [[ "$HYP" == "n" || "$HYP" == "no" ]]; then - echo "${OK} You choose NOT to reboot" + echo "šŸ‘Œ ${OK} You choose NOT to reboot" printf "\n%.0s" {1..1} # Check if NVIDIA GPU is present if lspci | grep -i "nvidia" &> /dev/null; then From 185a7d2db721084d6c69f705261ecd63eeb31ad7 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Fri, 28 Feb 2025 00:59:29 +0900 Subject: [PATCH 06/17] updated --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index 59e0eec..f9c3fe3 100755 --- a/install.sh +++ b/install.sh @@ -377,6 +377,7 @@ for option in "${options[@]}"; do thunar) echo "Installing Thunar file manager..." execute_script "thunar.sh" + execute_script "thunar_default.sh" ;; sddm_theme) echo "Downloading & Installing Additional SDDM theme..." @@ -390,6 +391,10 @@ for option in "${options[@]}"; do echo "Adding Pokemon color scripts to terminal..." execute_script "zsh_pokemon.sh" ;; + rog) + echo "Installing ROG packages..." + execute_script "rog.sh" + ;; dots) echo "Installing pre-configured Hyprland dotfiles..." execute_script "dotfiles-main.sh" From 59f9364309e98720a77c8155324802a495da6f0a Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Fri, 28 Feb 2025 01:15:00 +0900 Subject: [PATCH 07/17] updated location of installation of whiptail --- install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index f9c3fe3..96457d7 100755 --- a/install.sh +++ b/install.sh @@ -61,6 +61,12 @@ else fi fi +if ! command -v whiptail >/dev/null; then + echo "${NOTE} - whiptail is not installed. Installing..." + sudo pacman -S --noconfirm whiptail + printf "\n%.0s" {1..1} +fi + clear printf "\n%.0s" {1..2} @@ -98,12 +104,6 @@ if ! pacman -Qs pciutils > /dev/null; then printf "\n%.0s" {1..1} fi -if ! command -v whiptail >/dev/null; then - echo "${NOTE} - whiptail is not installed. Installing..." - sudo pacman -S --noconfirm whiptail - printf "\n%.0s" {1..1} -fi - # Set the name of the log file to include the current date and time LOG="install-$(date +%d-%H%M%S).log" From 7976768137f7afd3a7fb48cc2e654498d7d3519e Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sat, 1 Mar 2025 18:35:48 +0900 Subject: [PATCH 08/17] minor update install.sh --- install.sh | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/install.sh b/install.sh index 96457d7..ea6591a 100755 --- a/install.sh +++ b/install.sh @@ -27,18 +27,6 @@ if [[ $EUID -eq 0 ]]; then exit 1 fi -# Check if --preset argument is provided -if [[ "$1" == "--preset" ]]; then - - # nvidia - if [[ "$2" == "--nvidia" ]]; then - sed -i 's/^nvidia=".*"/nvidia="Y"/' preset.sh - sed -i 's/^nouveau=".*"/nouveau="Y"/' preset.sh - fi - - source ./preset.sh -fi - # Check if PulseAudio package is installed if pacman -Qq | grep -qw '^pulseaudio$'; then echo "$ERROR PulseAudio is detected as installed. Uninstall it first or edit install.sh on line 211 (execute_script 'pipewire.sh')." @@ -61,6 +49,7 @@ else fi fi +# install whiptails if detected not installed. Necessary for this version if ! command -v whiptail >/dev/null; then echo "${NOTE} - whiptail is not installed. Installing..." sudo pacman -S --noconfirm whiptail From eafb151d0d69ed1eed9ea9d2746c3bc9da883279 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sat, 1 Mar 2025 18:42:12 +0900 Subject: [PATCH 09/17] updated install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index ea6591a..e299fb5 100755 --- a/install.sh +++ b/install.sh @@ -62,7 +62,7 @@ printf "\n%.0s" {1..2} echo -e "\e[35m ā•¦ā•”ā•ā”Œā”€ā”ā”Œā”€ā”ā•¦ ╦ ╦┬ ā”¬ā”Œā”€ā”ā”¬ā”€ā”ā”¬ ā”Œā”€ā”ā”Œā”ā”Œā”Œā”¬ā” ╠╩╗│ ││ │║ ā• ā•ā•£ā””ā”¬ā”˜ā”œā”€ā”˜ā”œā”¬ā”˜ā”‚ ā”œā”€ā”¤ā”‚ā”‚ā”‚ ││ 2025 - ā•© ā•©ā””ā”€ā”˜ā””ā”€ā”˜ā•©ā•ā• ā•© ā•© ┓ ┓ ā”“ā””ā”€ā”“ā”€ā”˜ā”“ ā”“ā”˜ā””ā”˜ā”€ā”“ā”˜ + ā•© ā•©ā””ā”€ā”˜ā””ā”€ā”˜ā•©ā•ā• ā•© ā•© ┓ ┓ ā”“ā””ā”€ā”“ā”€ā”˜ā”“ ā”“ā”˜ā””ā”˜ā”€ā”“ā”˜ Arch Linux \e[0m" printf "\n%.0s" {1..1} From ab7063cadc88c8aa99f662052fb257ddab222787 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 2 Mar 2025 00:09:25 +0900 Subject: [PATCH 10/17] minor install.sh update --- install.sh | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/install.sh b/install.sh index e299fb5..f4fd8a0 100755 --- a/install.sh +++ b/install.sh @@ -152,19 +152,6 @@ if [[ "$1" == "--preset" && -n "$2" ]]; then load_preset "$2" fi -# List of services to check for active login managers -services=("gdm.service" "gdm3.service" "lightdm.service" "lxdm.service") - -# Function to check if any login services are active -check_services_running() { - for svc in "${services[@]}"; do - if systemctl is-active --quiet "$svc"; then - return 0 - fi - done - return 1 -} - # Check if yay or paru is installed echo "${INFO} - Checking if yay or paru is installed" if ! command -v yay &>/dev/null && ! command -v paru &>/dev/null; then @@ -194,6 +181,33 @@ else echo "${NOTE} - AUR helper is already installed. Skipping AUR helper selection." fi +# List of services to check for active login managers +services=("gdm.service" "gdm3.service" "lightdm.service" "lxdm.service") + +# Function to check if any login services are active +check_services_running() { + active_services=() # Array to store active services + for svc in "${services[@]}"; do + if systemctl is-active --quiet "$svc"; then + active_services+=("$svc") + fi + done + + if [ ${#active_services[@]} -gt 0 ]; then + return 0 + else + return 1 + fi +} + +if check_services_running; then + active_list=$(printf "%s\n" "${active_services[@]}") + + # Display the active login manager(s) in the whiptail message box + whiptail --title "Active non-SDDM login manager(s) detected" \ + --msgbox "The following non-SDDM login manager(s) are active:\n\n$active_list\n\nWARN: DO NOT install or choose to install SDDM & SDDM theme" 12 60 +fi + # Check if NVIDIA GPU is detected nvidia_detected=false if lspci | grep -i "nvidia" &> /dev/null; then @@ -327,8 +341,8 @@ for option in "${options[@]}"; do case "$option" in sddm) if check_services_running; then - # If any log in managers are active - whiptail --title "Error" --msgbox "One of the following login services is running:\n$(IFS=$'\n'; echo "${services[*]}")\n\nPlease stop it or DO not choose SDDM." 12 60 + active_list=$(printf "%s\n" "${active_services[@]}") + whiptail --title "Error" --msgbox "One of the following login services is running:\n$active_list\n\nPlease stop & disable it or DO not choose SDDM." 12 60 exec "$0" else echo "Installing and configuring SDDM..." From 79ce9a266e344755e93ad08657c56820a1fdd575 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 2 Mar 2025 00:54:52 +0900 Subject: [PATCH 11/17] minor adjustment on dotfiles main script --- install-scripts/dotfiles-main.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install-scripts/dotfiles-main.sh b/install-scripts/dotfiles-main.sh index 9138882..e77ecf4 100755 --- a/install-scripts/dotfiles-main.sh +++ b/install-scripts/dotfiles-main.sh @@ -4,7 +4,6 @@ ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## - SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Change the working directory to the parent directory of the script @@ -12,7 +11,10 @@ PARENT_DIR="$SCRIPT_DIR/.." cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } # Source the global functions script -source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi # Check if Hyprland-Dots exists printf "${NOTE} Cloning and Installing ${SKY_BLUE}KooL's Hyprland Dots${RESET}....\n" From 54ff099d51cfabfb5c1ddc7abccb69cb3e7a1b80 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 2 Mar 2025 02:17:41 +0900 Subject: [PATCH 12/17] updated login manager warning --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index f4fd8a0..b2995fa 100755 --- a/install.sh +++ b/install.sh @@ -205,7 +205,7 @@ if check_services_running; then # Display the active login manager(s) in the whiptail message box whiptail --title "Active non-SDDM login manager(s) detected" \ - --msgbox "The following non-SDDM login manager(s) are active:\n\n$active_list\n\nWARN: DO NOT install or choose to install SDDM & SDDM theme" 12 60 + --msgbox "The following non-SDDM login manager(s) are active:\n\n$active_list\n\nWARN: DO NOT install or choose to install SDDM & SDDM theme in the choices\nOr disable those active services first before running this script\n\nIf you ignored this warning and you chose to install SDDM, script will return to choices in the middle of the installation.\n\nšŸ³ļø So choose wisely\n\nšŸ˜Ž Ja " 22 80 fi # Check if NVIDIA GPU is detected From 16f1b2418d875f717bc99b93e1a55e90fa9d477f Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 2 Mar 2025 13:21:02 +0900 Subject: [PATCH 13/17] adjusted install.sh --- install.sh | 132 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 79 insertions(+), 53 deletions(-) diff --git a/install.sh b/install.sh index b2995fa..f6be3b5 100755 --- a/install.sh +++ b/install.sh @@ -19,17 +19,24 @@ BLUE="$(tput setaf 4)" SKY_BLUE="$(tput setaf 6)" RESET="$(tput sgr0)" +# Create Directory for Install Logs +if [ ! -d Install-Logs ]; then + mkdir Install-Logs +fi + +# Set the name of the log file to include the current date and time +LOG="Install-Logs/01-Hyprland-Install-Scripts-$(date +%d-%H%M%S).log" # Check if running as root. If root, script will exit if [[ $EUID -eq 0 ]]; then - echo "${ERROR} This script should ${WARNING}NOT${RESET} be executed as root!! Exiting......." + echo "${ERROR} This script should ${WARNING}NOT${RESET} be executed as root!! Exiting......." | tee -a "$LOG" printf "\n%.0s" {1..2} exit 1 fi # Check if PulseAudio package is installed if pacman -Qq | grep -qw '^pulseaudio$'; then - echo "$ERROR PulseAudio is detected as installed. Uninstall it first or edit install.sh on line 211 (execute_script 'pipewire.sh')." + echo "$ERROR PulseAudio is detected as installed. Uninstall it first or edit install.sh on line 211 (execute_script 'pipewire.sh')." | tee -a "$LOG" printf "\n%.0s" {1..2} exit 1 fi @@ -41,17 +48,17 @@ else echo "$NOTE Install base-devel.........." if sudo pacman -S --noconfirm base-devel; then - echo "šŸ‘Œ ${OK} base-devel has been installed successfully." + echo "šŸ‘Œ ${OK} base-devel has been installed successfully." | tee -a "$LOG" else - echo "āŒ $ERROR base-devel not found nor cannot be installed." - echo "$ACTION Please install base-devel manually before running this script... Exiting" + echo "āŒ $ERROR base-devel not found nor cannot be installed." | tee -a "$LOG" + echo "$ACTION Please install base-devel manually before running this script... Exiting" | tee -a "$LOG" exit 1 fi fi # install whiptails if detected not installed. Necessary for this version if ! command -v whiptail >/dev/null; then - echo "${NOTE} - whiptail is not installed. Installing..." + echo "${NOTE} - whiptail is not installed. Installing..." | tee -a "$LOG" sudo pacman -S --noconfirm whiptail printf "\n%.0s" {1..1} fi @@ -77,30 +84,23 @@ NOTE: If you are installing on a VM, ensure to enable 3D acceleration else Hyprl if ! whiptail --title "Proceed with Installation?" \ --yesno "Would you like to proceed?" 7 50; then echo -e "\n" - echo "āŒ ${INFO} You 🫵 chose ${YELLOW}NOT${RESET} to proceed. ${YELLOW}Exiting...${RESET}" - echo -e "\n" + echo "āŒ ${INFO} You 🫵 chose ${YELLOW}NOT${RESET} to proceed. ${YELLOW}Exiting...${RESET}" | tee -a "$LOG" + echo -e "\n" exit 1 fi -echo "šŸ‘Œ ${OK} šŸ‡µšŸ‡­ ${MAGENTA}KooL..${RESET} ${SKY_BLUE}lets continue with the installation...${RESET}" +echo "šŸ‘Œ ${OK} šŸ‡µšŸ‡­ ${MAGENTA}KooL..${RESET} ${SKY_BLUE}lets continue with the installation...${RESET}" | tee -a "$LOG" +sleep 1 printf "\n%.0s" {1..1} # install pciutils if detected not installed. Necessary for detecting GPU if ! pacman -Qs pciutils > /dev/null; then - echo "${NOTE} - pciutils is not installed. Installing..." + echo "${NOTE} - pciutils is not installed. Installing..." | tee -a "$LOG" sudo pacman -S --noconfirm pciutils printf "\n%.0s" {1..1} fi -# Set the name of the log file to include the current date and time -LOG="install-$(date +%d-%H%M%S).log" - -# Create Directory for Install Logs -if [ ! -d Install-Logs ]; then - mkdir Install-Logs -fi - # Path to the install-scripts directory script_directory=install-scripts @@ -163,11 +163,11 @@ if ! command -v yay &>/dev/null && ! command -v paru &>/dev/null; then 3>&1 1>&2 2>&3) if [ -z "$aur_helper" ]; then - echo "āŒ ${INFO} You 🫵 cancelled the selection. ${YELLOW}Goodbye!${RESET}" + echo "āŒ ${INFO} You 🫵 cancelled the selection. ${YELLOW}Goodbye!${RESET}" | tee -a "$LOG" exit 0 fi - echo "${INFO} - You selected: $aur_helper as your AUR helper" + echo "${INFO} - You selected: $aur_helper as your AUR helper" | tee -a "$LOG" aur_helper=$(echo "$aur_helper" | tr -d '"') @@ -217,7 +217,7 @@ fi # Initialize the options array for whiptail checklist options_command=( - whiptail --title "Select Options" --checklist "Choose options to install or configure\nNOTE: spacebar to select" 28 85 20 + whiptail --title "Select Options" --checklist "Choose options to install or configure\nNOTE: 'SPACEBAR' to select & 'TAB' key to change selection" 28 85 20 ) # Add NVIDIA options if detected @@ -228,7 +228,7 @@ if [ "$nvidia_detected" == "true" ]; then ) fi -# Check if user is already in the 'input' group +# Add 'input_group' option if user is not in input group input_group_detected=false if ! groups "$(whoami)" | grep -q '\binput\b'; then input_group_detected=true @@ -257,46 +257,72 @@ options_command+=( "dots" "Download and install pre-configured KooL Hyprland dotfiles?" "OFF" ) +# Capture the selected options before the while loop starts while true; do - # Execute the checklist and capture the selected options selected_options=$("${options_command[@]}" 3>&1 1>&2 2>&3) # Check if the user pressed Cancel (exit status 1) if [ $? -ne 0 ]; then - echo -e "\n" - echo "āŒ ${INFO} You 🫵 cancelled the selection. ${YELLOW}Goodbye!${RESET}" + echo -e "\n" + echo "āŒ ${INFO} You 🫵 cancelled the selection. ${YELLOW}Goodbye!${RESET}" | tee -a "$LOG" exit 0 # Exit the script if Cancel is pressed fi # If no option was selected, notify and restart the selection if [ -z "$selected_options" ]; then - whiptail --title "Warning" --msgbox "āš ļø No options were selected. Please select at least one option." 10 60 + whiptail --title "Warning" --msgbox "No options were selected. Please select at least one option." 10 60 continue # Return to selection if no options selected fi + # Strip the quotes and trim spaces if necessary (sanitize the input) + selected_options=$(echo "$selected_options" | tr -d '"' | tr -s ' ') + # Convert selected options into an array (preserving spaces in values) IFS=' ' read -r -a options <<< "$selected_options" - # Prepare Confirmation Message + # Check if the "dots" option was selected + dots_selected="OFF" + for option in "${options[@]}"; do + if [[ "$option" == "dots" ]]; then + dots_selected="ON" + break + fi + done + + # If "dots" is not selected, show a note and ask the user to proceed or return to choices + if [[ "$dots_selected" == "OFF" ]]; then + # Show a note about not selecting the "dots" option + if ! whiptail --title "KooL Hyprland Dot Files" --yesno \ + "ā“ You have not selected to install the pre-configured KooL Hyprland dotfiles.\n\nKindly NOTE that if you proceed without Dots, Hyprland will start with default vanilla Hyprland configuration and I won't be able to give you support.\n\nšŸ”™ Would you like to continue install without KooL Hyprland Dots or return to choices/options?" \ + --yes-button "Continue" --no-button "Return" 15 90; then + echo "šŸ”™ Returning to options..." | tee -a "$LOG" + continue + else + # User chose to continue + echo "${INFO} āš ļø Continuing WITHOUT the dotfiles installation..." | tee -a "$LOG" + printf "\n%.0s" {1..1} + fi + fi + + # Prepare the confirmation message confirm_message="You have selected the following options:\n\n" for option in "${options[@]}"; do confirm_message+=" - $option\n" done - confirm_message+="\nAre you happy with these choices?" + confirm_message+="\nšŸ˜€ Are you happy with these choices?" - # onfirmation prompt + # Confirmation prompt if ! whiptail --title "Confirm Your Choices" --yesno "$(printf "%s" "$confirm_message")" 25 80; then - echo -e "\n" - echo "āŒ ${SKY_BLUE}You 🫵 cancelled the confirmation${RESET}. ${YELLOW}Exiting...${RESET}" + echo -e "\n" + echo "āŒ ${SKY_BLUE}You 🫵 cancelled the confirmation${RESET}. ${YELLOW}Exiting...${RESET}" | tee -a "$LOG" exit 0 fi - echo "šŸ‘Œ ${OK} You confirmed your choices. Proceeding with ${SKY_BLUE}KooL šŸ‡µšŸ‡­ Hyprland Installation...${RESET}" - break + echo "šŸ‘Œ ${OK} You confirmed your choices. Proceeding with ${SKY_BLUE}KooL šŸ‡µšŸ‡­ Hyprland Installation...${RESET}" | tee -a "$LOG" + break done -# Proceed with installation -echo "šŸ‘Œ ${OK} - Proceeding with selected options..." +printf "\n%.0s" {1..1} # Ensuring base-devel is installed execute_script "00-base.sh" @@ -314,15 +340,15 @@ fi sleep 1 # Run the Hyprland related scripts -echo "Installing KooL Hyprland additional packages..." +echo "Installing KooL Hyprland additional packages..." | tee -a "$LOG" sleep 1 execute_script "01-hypr-pkgs.sh" -echo "Installing pipewire and pipewire-audio..." +echo "Installing pipewire and pipewire-audio..." | tee -a "$LOG" sleep 1 execute_script "pipewire.sh" -echo "Installing necessary fonts..." +echo "Installing necessary fonts..." | tee -a "$LOG" sleep 1 execute_script "fonts.sh" @@ -345,65 +371,65 @@ for option in "${options[@]}"; do whiptail --title "Error" --msgbox "One of the following login services is running:\n$active_list\n\nPlease stop & disable it or DO not choose SDDM." 12 60 exec "$0" else - echo "Installing and configuring SDDM..." + echo "Installing and configuring SDDM..." | tee -a "$LOG" execute_script "sddm.sh" fi ;; nvidia) - echo "Configuring nvidia stuff" + echo "Configuring nvidia stuff" | tee -a "$LOG" execute_script "nvidia.sh" ;; nouveau) echo "blacklisting nouveau" - execute_script "nvidia_nouveau.sh" + execute_script "nvidia_nouveau.sh" | tee -a "$LOG" ;; gtk_themes) - echo "Installing GTK themes..." + echo "Installing GTK themes..." | tee -a "$LOG" execute_script "gtk_themes.sh" ;; input_group) - echo "Adding user into input group..." + echo "Adding user into input group..." | tee -a "$LOG" execute_script "InputGroup.sh" ;; ags) - echo "Installing AGS..." + echo "Installing AGS..." | tee -a "$LOG" execute_script "ags.sh" ;; xdph) - echo "Installing XDG-DESKTOP-PORTAL-HYPRLAND..." + echo "Installing XDG-DESKTOP-PORTAL-HYPRLAND..." | tee -a "$LOG" execute_script "xdph.sh" ;; bluetooth) - echo "Configuring Bluetooth..." + echo "Configuring Bluetooth..." | tee -a "$LOG" execute_script "bluetooth.sh" ;; thunar) - echo "Installing Thunar file manager..." + echo "Installing Thunar file manager..." | tee -a "$LOG" execute_script "thunar.sh" execute_script "thunar_default.sh" ;; sddm_theme) - echo "Downloading & Installing Additional SDDM theme..." + echo "Downloading & Installing Additional SDDM theme..." | tee -a "$LOG" execute_script "sddm_theme.sh" ;; zsh) - echo "Installing zsh with Oh-My-Zsh..." + echo "Installing zsh with Oh-My-Zsh..." | tee -a "$LOG" execute_script "zsh.sh" ;; pokemon) - echo "Adding Pokemon color scripts to terminal..." + echo "Adding Pokemon color scripts to terminal..." | tee -a "$LOG" execute_script "zsh_pokemon.sh" ;; rog) - echo "Installing ROG packages..." + echo "Installing ROG packages..." | tee -a "$LOG" execute_script "rog.sh" ;; dots) - echo "Installing pre-configured Hyprland dotfiles..." + echo "Installing pre-configured Hyprland dotfiles..." | tee -a "$LOG" execute_script "dotfiles-main.sh" ;; *) - echo "Unknown option: $option" + echo "Unknown option: $option" | tee -a "$LOG" ;; esac done From e87f6c1beb6a6738d23be22b0b9893f18a022eaf Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 6 Mar 2025 22:56:00 +0900 Subject: [PATCH 14/17] switched to lsd from eza --- CHANGELOGS.md | 4 ++++ assets/.zshrc | 10 ++++++---- install-scripts/zsh.sh | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOGS.md b/CHANGELOGS.md index ac224cb..9189f60 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -1,5 +1,9 @@ ## CHANGELOGS +## 06 March 2025 +- Switched to whiptail version for Y & N questions +- switched eza to lsd + ## 23 Feb 2025 - added Victor Mono Font for proper hyprlock font rendering for Dots v2.3.12 - added Fantasque Sans Mono Nerd for Kitty diff --git a/assets/.zshrc b/assets/.zshrc index 69124ec..c1d57d6 100644 --- a/assets/.zshrc +++ b/assets/.zshrc @@ -25,10 +25,12 @@ source $ZSH/oh-my-zsh.sh # fastfetch. Will be disabled if above colorscript was chosen to install fastfetch -c $HOME/.config/fastfetch/config-compact.jsonc -# Set-up icons for files/folders in terminal -alias ls='eza -a --icons' -alias ll='eza -al --icons' -alias lt='eza -a --tree --level=1 --icons' +# Set-up icons for files/folders in terminal using lsd +alias ls='lsd' +alias l='ls -l' +alias la='ls -a' +alias lla='ls -la' +alias lt='ls --tree' # Set-up FZF key bindings (CTRL R for fuzzy history finder) source <(fzf --zsh) diff --git a/install-scripts/zsh.sh b/install-scripts/zsh.sh index 72264ad..948ca75 100755 --- a/install-scripts/zsh.sh +++ b/install-scripts/zsh.sh @@ -3,7 +3,7 @@ # zsh and oh my zsh# zsh_pkg=( - eza + lsd mercurial zsh zsh-completions From 213e3757df8e2a7bdc0a9006c3e81d2c15968c47 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Fri, 7 Mar 2025 10:12:24 +0900 Subject: [PATCH 15/17] adjusted to disable sddm option if non-SDDM login managers are active --- README.md | 10 ---------- install.sh | 14 ++++++++++---- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index a137be2..3724c0e 100644 --- a/README.md +++ b/README.md @@ -110,16 +110,6 @@ chmod +x install.sh -### 🤟 semi-unattended installation (new for End of 2025) -- edit preset.sh to modify what packages you want. Make sure to change only with ON or OFF -- to use preset instead of usual `./install.sh` you can ran like this - -```bash -./install.sh --preset preset.sh -``` -- its called semi-unattended it is because you still have to answer some questions when installing KooL's Hyprland Dots - - #### ✨ for ZSH and OH-MY-ZSH installation > installer should auto change your default shell to zsh. However, if it does not, do this ```bash diff --git a/install.sh b/install.sh index f6be3b5..740bcea 100755 --- a/install.sh +++ b/install.sh @@ -205,14 +205,14 @@ if check_services_running; then # Display the active login manager(s) in the whiptail message box whiptail --title "Active non-SDDM login manager(s) detected" \ - --msgbox "The following non-SDDM login manager(s) are active:\n\n$active_list\n\nWARN: DO NOT install or choose to install SDDM & SDDM theme in the choices\nOr disable those active services first before running this script\n\nIf you ignored this warning and you chose to install SDDM, script will return to choices in the middle of the installation.\n\nšŸ³ļø So choose wisely\n\nšŸ˜Ž Ja " 22 80 + --msgbox "The following login manager(s) are active:\n\n$active_list\n\nIf you want to install SDDM and SDDM theme, stop and disable first the active services above first before running this script\n\nYour option to install SDDM and SDDM theme has now been removed\n\nšŸ˜Ž Ja " 22 80 fi # Check if NVIDIA GPU is detected nvidia_detected=false if lspci | grep -i "nvidia" &> /dev/null; then nvidia_detected=true - whiptail --title "NVIDIA GPU Detected" --msgbox "NVIDIA GPU detected in your system.\n\nNOTE: The script will install nvidia-dkms, nvidia-utils, and nvidia-settings if you choose to configure." 12 60 + whiptail --title "NVIDIA GPU Detected" --msgbox "NVIDIA GPU detected in your system.\n\nNOTE: The script will install nvidia-dkms, nvidia-utils, and nvidia-settings if you chose to configure." 12 60 fi # Initialize the options array for whiptail checklist @@ -242,14 +242,20 @@ if [ "$input_group_detected" == "true" ]; then ) fi +# Conditionally add SDDM and SDDM theme options if no active login manager is found +if ! check_services_running; then + options_command+=( + "sddm" "Install & configure SDDM login manager?" "OFF" + "sddm_theme" "Download & Install Additional SDDM theme?" "OFF" + ) +fi + # Add the remaining static options options_command+=( "gtk_themes" "Install GTK themes (required for Dark/Light function)" "OFF" "bluetooth" "Do you want script to configure Bluetooth?" "OFF" "thunar" "Do you want Thunar file manager to be installed?" "OFF" "ags" "Install AGS v1 for Desktop-Like Overview" "OFF" - "sddm" "Install & configure SDDM login manager?" "OFF" - "sddm_theme" "Download & Install Additional SDDM theme?" "OFF" "xdph" "Install XDG-DESKTOP-PORTAL-HYPRLAND (for screen share)?" "OFF" "zsh" "Install zsh shell with Oh-My-Zsh?" "OFF" "pokemon" "Add Pokemon color scripts to your terminal?" "OFF" From 30fb2d18145ad6729581731c4bd09a7f948ff804 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Fri, 7 Mar 2025 11:05:06 +0900 Subject: [PATCH 16/17] added some colors in messages --- install.sh | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/install.sh b/install.sh index 740bcea..322d539 100755 --- a/install.sh +++ b/install.sh @@ -346,19 +346,19 @@ fi sleep 1 # Run the Hyprland related scripts -echo "Installing KooL Hyprland additional packages..." | tee -a "$LOG" +echo "${INFO} Installing ${SKY_BLUE}KooL Hyprland additional packages...${RESET}" | tee -a "$LOG" sleep 1 execute_script "01-hypr-pkgs.sh" -echo "Installing pipewire and pipewire-audio..." | tee -a "$LOG" +echo "${INFO} Installing ${SKY_BLUE}pipewire and pipewire-audio...${RESET}" | tee -a "$LOG" sleep 1 execute_script "pipewire.sh" -echo "Installing necessary fonts..." | tee -a "$LOG" +echo "${INFO} Installing ${SKY_BLUE}necessary fonts...${RESET}" | tee -a "$LOG" sleep 1 execute_script "fonts.sh" -echo "Installing Hyprland..." +echo "${INFO} Installing ${SKY_BLUE}Hyprland...${RESET}" sleep 1 execute_script "hyprland.sh" @@ -377,61 +377,61 @@ for option in "${options[@]}"; do whiptail --title "Error" --msgbox "One of the following login services is running:\n$active_list\n\nPlease stop & disable it or DO not choose SDDM." 12 60 exec "$0" else - echo "Installing and configuring SDDM..." | tee -a "$LOG" + echo "${INFO}Installing and configuring ${SKY_BLUE}SDDM...${RESET}" | tee -a "$LOG" execute_script "sddm.sh" fi ;; nvidia) - echo "Configuring nvidia stuff" | tee -a "$LOG" + echo "${INFO}Configuring ${SKY_BLUE}nvidia stuff${RESET}" | tee -a "$LOG" execute_script "nvidia.sh" ;; nouveau) - echo "blacklisting nouveau" + echo "${INFO}blacklisting ${SKY_BLUE}nouveau${RESET}" execute_script "nvidia_nouveau.sh" | tee -a "$LOG" ;; gtk_themes) - echo "Installing GTK themes..." | tee -a "$LOG" + echo "${INFO}Installing ${SKY_BLUE}GTK themes...${RESET}" | tee -a "$LOG" execute_script "gtk_themes.sh" ;; input_group) - echo "Adding user into input group..." | tee -a "$LOG" + echo "${INFO}Adding user into ${SKY_BLUE}input group...${RESET}" | tee -a "$LOG" execute_script "InputGroup.sh" ;; ags) - echo "Installing AGS..." | tee -a "$LOG" + echo "${INFO}Installing ${SKY_BLUE}AGS v1 for Desktop Overview...${RESET}" | tee -a "$LOG" execute_script "ags.sh" ;; xdph) - echo "Installing XDG-DESKTOP-PORTAL-HYPRLAND..." | tee -a "$LOG" + echo "${INFO}Installing ${SKY_BLUE}xdg-desktop-portal-hyprland...${RESET}" | tee -a "$LOG" execute_script "xdph.sh" ;; bluetooth) - echo "Configuring Bluetooth..." | tee -a "$LOG" + echo "${INFO}Configuring ${SKY_BLUE}Bluetooth...${RESET}" | tee -a "$LOG" execute_script "bluetooth.sh" ;; thunar) - echo "Installing Thunar file manager..." | tee -a "$LOG" + echo "${INFO}Installing ${SKY_BLUE}Thunar file manager...${RESET}" | tee -a "$LOG" execute_script "thunar.sh" execute_script "thunar_default.sh" ;; sddm_theme) - echo "Downloading & Installing Additional SDDM theme..." | tee -a "$LOG" + echo "${INFO}Downloading & Installing ${SKY_BLUE}Additional SDDM theme...${RESET}" | tee -a "$LOG" execute_script "sddm_theme.sh" ;; zsh) - echo "Installing zsh with Oh-My-Zsh..." | tee -a "$LOG" + echo "${INFO}Installing ${SKY_BLUE}zsh with Oh-My-Zsh...${RESET}" | tee -a "$LOG" execute_script "zsh.sh" ;; pokemon) - echo "Adding Pokemon color scripts to terminal..." | tee -a "$LOG" + echo "${INFO}Adding ${SKY_BLUE}Pokemon color scripts to terminal...${RESET}" | tee -a "$LOG" execute_script "zsh_pokemon.sh" ;; rog) - echo "Installing ROG packages..." | tee -a "$LOG" + echo "${INFO}Installing ${SKY_BLUE}ROG laptop packages...${RESET}" | tee -a "$LOG" execute_script "rog.sh" ;; dots) - echo "Installing pre-configured Hyprland dotfiles..." | tee -a "$LOG" + echo "${INFO}Installing pre-configured ${SKY_BLUE}KooL Hyprland dotfiles...${RESET}" | tee -a "$LOG" execute_script "dotfiles-main.sh" ;; *) From 36b0732056973b80e59ebeb94a41b441f5cf7181 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Fri, 7 Mar 2025 13:24:53 +0900 Subject: [PATCH 17/17] some color coding added --- install-scripts/01-hypr-pkgs.sh | 2 +- install.sh | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/install-scripts/01-hypr-pkgs.sh b/install-scripts/01-hypr-pkgs.sh index 1dfd3be..84542d5 100755 --- a/install-scripts/01-hypr-pkgs.sh +++ b/install-scripts/01-hypr-pkgs.sh @@ -119,7 +119,7 @@ fi printf "\n%.0s" {1..1} # Installation of main components -printf "\n%s - Installing ${SKY_BLUE}KooL's hyprland necessary packages${RESET} .... \n" "${NOTE}" +printf "\n%s - Installing ${SKY_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.sh b/install.sh index 322d539..8d4aba0 100755 --- a/install.sh +++ b/install.sh @@ -315,7 +315,7 @@ while true; do for option in "${options[@]}"; do confirm_message+=" - $option\n" done - confirm_message+="\nšŸ˜€ Are you happy with these choices?" + confirm_message+="\nAre you happy with these choices?" # Confirmation prompt if ! whiptail --title "Confirm Your Choices" --yesno "$(printf "%s" "$confirm_message")" 25 80; then @@ -377,61 +377,61 @@ for option in "${options[@]}"; do whiptail --title "Error" --msgbox "One of the following login services is running:\n$active_list\n\nPlease stop & disable it or DO not choose SDDM." 12 60 exec "$0" else - echo "${INFO}Installing and configuring ${SKY_BLUE}SDDM...${RESET}" | tee -a "$LOG" + echo "${INFO} Installing and configuring ${SKY_BLUE}SDDM...${RESET}" | tee -a "$LOG" execute_script "sddm.sh" fi ;; nvidia) - echo "${INFO}Configuring ${SKY_BLUE}nvidia stuff${RESET}" | tee -a "$LOG" + echo "${INFO} Configuring ${SKY_BLUE}nvidia stuff${RESET}" | tee -a "$LOG" execute_script "nvidia.sh" ;; nouveau) - echo "${INFO}blacklisting ${SKY_BLUE}nouveau${RESET}" + echo "${INFO} blacklisting ${SKY_BLUE}nouveau${RESET}" execute_script "nvidia_nouveau.sh" | tee -a "$LOG" ;; gtk_themes) - echo "${INFO}Installing ${SKY_BLUE}GTK themes...${RESET}" | tee -a "$LOG" + echo "${INFO} Installing ${SKY_BLUE}GTK themes...${RESET}" | tee -a "$LOG" execute_script "gtk_themes.sh" ;; input_group) - echo "${INFO}Adding user into ${SKY_BLUE}input group...${RESET}" | tee -a "$LOG" + echo "${INFO} Adding user into ${SKY_BLUE}input group...${RESET}" | tee -a "$LOG" execute_script "InputGroup.sh" ;; ags) - echo "${INFO}Installing ${SKY_BLUE}AGS v1 for Desktop Overview...${RESET}" | tee -a "$LOG" + echo "${INFO} Installing ${SKY_BLUE}AGS v1 for Desktop Overview...${RESET}" | tee -a "$LOG" execute_script "ags.sh" ;; xdph) - echo "${INFO}Installing ${SKY_BLUE}xdg-desktop-portal-hyprland...${RESET}" | tee -a "$LOG" + echo "${INFO} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland...${RESET}" | tee -a "$LOG" execute_script "xdph.sh" ;; bluetooth) - echo "${INFO}Configuring ${SKY_BLUE}Bluetooth...${RESET}" | tee -a "$LOG" + echo "${INFO} Configuring ${SKY_BLUE}Bluetooth...${RESET}" | tee -a "$LOG" execute_script "bluetooth.sh" ;; thunar) - echo "${INFO}Installing ${SKY_BLUE}Thunar file manager...${RESET}" | tee -a "$LOG" + echo "${INFO} Installing ${SKY_BLUE}Thunar file manager...${RESET}" | tee -a "$LOG" execute_script "thunar.sh" execute_script "thunar_default.sh" ;; sddm_theme) - echo "${INFO}Downloading & Installing ${SKY_BLUE}Additional SDDM theme...${RESET}" | tee -a "$LOG" + echo "${INFO} Downloading & Installing ${SKY_BLUE}Additional SDDM theme...${RESET}" | tee -a "$LOG" execute_script "sddm_theme.sh" ;; zsh) - echo "${INFO}Installing ${SKY_BLUE}zsh with Oh-My-Zsh...${RESET}" | tee -a "$LOG" + echo "${INFO} Installing ${SKY_BLUE}zsh with Oh-My-Zsh...${RESET}" | tee -a "$LOG" execute_script "zsh.sh" ;; pokemon) - echo "${INFO}Adding ${SKY_BLUE}Pokemon color scripts to terminal...${RESET}" | tee -a "$LOG" + echo "${INFO} Adding ${SKY_BLUE}Pokemon color scripts to terminal...${RESET}" | tee -a "$LOG" execute_script "zsh_pokemon.sh" ;; rog) - echo "${INFO}Installing ${SKY_BLUE}ROG laptop packages...${RESET}" | tee -a "$LOG" + echo "${INFO} Installing ${SKY_BLUE}ROG laptop packages...${RESET}" | tee -a "$LOG" execute_script "rog.sh" ;; dots) - echo "${INFO}Installing pre-configured ${SKY_BLUE}KooL Hyprland dotfiles...${RESET}" | tee -a "$LOG" + echo "${INFO} Installing pre-configured ${SKY_BLUE}KooL Hyprland dotfiles...${RESET}" | tee -a "$LOG" execute_script "dotfiles-main.sh" ;; *)