diff --git a/CHANGELOGS.md b/CHANGELOGS.md index 2209976..221c426 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -1,5 +1,10 @@ ## Changelogs +## 04 Feb 2025 +- offering a new SDDM theme from here [SDDM](https://codeberg.org/minMelody/sddm-sequoia) +- some tweaking on install-scripts except the compiling part. It will not show progress for much cleaner work +- script will automatically detect if you have nvidia but script still offer if you want to set up for user + ## 30 Jan 2025 - AGS (aylur's GTK shell) v1 for desktop overview is now optional diff --git a/assets/sddm.png b/assets/sddm.png new file mode 100644 index 0000000..c42ae06 Binary files /dev/null and b/assets/sddm.png differ diff --git a/install-scripts/00-dependencies.sh b/install-scripts/00-dependencies.sh index 948ed01..7794d9f 100755 --- a/install-scripts/00-dependencies.sh +++ b/install-scripts/00-dependencies.sh @@ -1,8 +1,6 @@ #!/bin/bash # 💫 https://github.com/JaKooLit 💫 # # main dependencies # -# 22 Aug 2024 - NOTE will trim this more down - # packages neeeded dependencies=( @@ -50,14 +48,10 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" LOG="Install-Logs/install-$(date +%d-%H%M%S)_dependencies.log" # Installation of main dependencies -printf "\n%s - Installing main dependencies.... \n" "${NOTE}" +printf "\n%s - Installing ${SKY_BLUE}main dependencies....${RESET} \n" "${NOTE}" for PKG1 in "${dependencies[@]}"; do - install_package "$PKG1" 2>&1 | tee -a "$LOG" - if [ $? -ne 0 ]; then - echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs" - exit 1 - fi + install_package "$PKG1" "$LOG" done -clear +printf "\n%.0s" {1..2} diff --git a/install-scripts/01-hypr-pkgs.sh b/install-scripts/01-hypr-pkgs.sh index 9c00800..a524454 100755 --- a/install-scripts/01-hypr-pkgs.sh +++ b/install-scripts/01-hypr-pkgs.sh @@ -86,39 +86,27 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" LOG="Install-Logs/install-$(date +%d-%H%M%S)_hypr-pkgs.log" # Installation of main components -printf "\n%s - Installing hyprland packages.... \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" 2>&1 | tee -a "$LOG" - if [ $? -ne 0 ]; then - echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs" - exit 1 - fi + install_package "$PKG1" "$LOG" done -printf "\n%s - Uninstalling some packages inorder for dots to work properly \n" "${NOTE}" +printf "\n%s - ${SKY_BLUE}Uninstalling some packages${RESET} inorder for dots to work properly \n" "${NOTE}" for PKG in "${uninstall[@]}"; do - uninstall_package "$PKG" 2>&1 | tee -a "$LOG" - if [ $? -ne 0 ]; then - echo -e "\e[1A\e[K${ERROR} - $PKG uninstallation had failed, please check the log" - exit 1 - fi + uninstall_package "$PKG" "$LOG" done for PKG2 in "${force[@]}"; do - re_install_package "$PKG2" 2>&1 | tee -a "$LOG" - if [ $? -ne 0 ]; then - echo -e "\e[1A\e[K${ERROR} - Force reinstall of $PKG2 failed" - exit 1 - fi + re_install_package "$PKG2" "$LOG" done # Install up-to-date Rust -echo "Installing most up to date Rust compiler..." +echo "${INFO}Installing most ${YELLOW}up to date Rust compiler${RESET} ..." curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y 2>&1 | tee -a "$LOG" source "$HOME/.cargo/env" ## making brightnessctl work sudo chmod +s $(which brightnessctl) 2>&1 | tee -a "$LOG" || true -clear +printf "\n%.0s" {1..2} diff --git a/install-scripts/02-pre-cleanup.sh b/install-scripts/02-pre-cleanup.sh index c876574..0e57d49 100644 --- a/install-scripts/02-pre-cleanup.sh +++ b/install-scripts/02-pre-cleanup.sh @@ -48,3 +48,4 @@ for PKG_NAME in "${PACKAGES[@]}"; do fi done +printf "\n%.0s" {1..2} \ No newline at end of file diff --git a/install-scripts/Global_functions.sh b/install-scripts/Global_functions.sh index 241469c..f8a3e6c 100755 --- a/install-scripts/Global_functions.sh +++ b/install-scripts/Global_functions.sh @@ -47,63 +47,54 @@ show_progress() { } -# Function for re-installing packages with a progress bar -re_install_package() { - echo -e "${NOTE} Force installing ${YELLOW}$1${RESET} ..." - - # Run the reinstall command in the background +# Function for installing packages with a progress bar +install_package() { ( - stdbuf -oL sudo apt-get install --reinstall -y "$1" 2>&1 + stdbuf -oL sudo apt-get install -y "$1" 2>&1 ) >> "$LOG" 2>&1 & PID=$! show_progress $PID "$1" # Double check if the package was re-installed successfully if dpkg -l | grep -q -w "$1"; then - echo -e "\e[1A\e[K${OK} Package ${YELLOW}$1${RESET} has been successfully re-installed!" + echo -e "\e[1A\e[K${OK} Package ${YELLOW}$1${RESET} has been successfully installed!" + return 0 else # Package was not found, installation failed - echo -e "${ERROR} $1 failed to re-install. Please check the install.log. You may need to install it manually. Sorry, I have tried :(" - exit 1 + echo -e "${ERROR} ${YELLOW}$1${RESET} failed to install. Please check the install.log. You may need to install it manually. Sorry, I have tried :(" + return 1 fi } # Function for re-installing packages -re_install_package() { - echo -e "${NOTE} Force installing ${YELLOW}$1${RESET} ..." - +re_install_package() { # Try to reinstall the package if sudo apt-get install --reinstall -y "$1" 2>&1 | tee -a "$LOG"; then - # Check if the package was installed successfully if dpkg -l | grep -q -w "$1"; then echo -e "\e[1A\e[K${OK} Package ${YELLOW}$1${RESET} has been successfully re-installed!" + return 0 else # Package was not found, installation failed echo -e "${ERROR} $1 failed to install. Please check the install.log. You may need to install it manually. Sorry, I have tried :(" - exit 1 + return 1 fi else # Installation command failed echo -e "${ERROR} Failed to reinstall $1. Please check the install.log. You may need to install it manually. Sorry, I have tried :(" - exit 1 + return 1 fi } +# Function for uninstalling packages uninstall_package() { - # Check if package is installed if sudo dpkg -l | grep -q -w "^ii $1" ; then - # Package is installed, attempt to uninstall - echo -e "${NOTE} Uninstalling ${YELLOW}$1${RESET} ..." - - # Attempt to uninstall the package and its configuration files sudo apt-get autoremove -y "$1" >> "$LOG" 2>&1 - - # Check if the package is still installed after removal attempt if ! dpkg -l | grep -q -w "^ii $1" ; then echo -e "\e[1A\e[K${OK} ${MAGENTA}$1${RESET} was uninstalled." + return 0 else echo -e "\e[1A\e[K${ERROR} $1 failed to uninstall. Please check the uninstall.log." - exit 1 + return 1 fi fi } diff --git a/install-scripts/InputGroup.sh b/install-scripts/InputGroup.sh index b2bc142..e201d41 100755 --- a/install-scripts/InputGroup.sh +++ b/install-scripts/InputGroup.sh @@ -1,6 +1,10 @@ #!/bin/bash # 💫 https://github.com/JaKooLit 💫 # -# Adding user in input group for waybar keyboard state module # +# Adding users into input group # + +if [[ $USE_PRESET = [Yy] ]]; then + source ./preset.sh +fi ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## # Determine the directory where the script is located @@ -16,39 +20,39 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" LOG="Install-Logs/install-$(date +%d-%H%M%S)_input.log" while true; do - echo "${WARN} This script will add your user to the 'input' group." - echo "${NOTE} Please note that adding yourself to the 'input' group might be necessary for waybar keyboard-state functionality." - - printf "\n%.0s" {1..2} + 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 ${MAGENTA}waybar keyboard-state functionality${RESET} ." - read -p "${YELLOW}Do you want to proceed? (y/n): ${RESET}" choice + printf "\n%.0s" {1..1} + + if [[ -z $input_group_choid ]]; then + read -p "${YELLOW}Do you want to proceed? (y/n): ${RESET}" input_group_choid + fi - if [[ $choice == "y" || $choice == "Y" ]]; then + if [[ $input_group_choid == "y" || $input_group_choid == "Y" ]]; then # Check if the 'input' group exists if grep -q '^input:' /etc/group; then - echo "${OK} 'input' group exists." 2>&1 | tee -a "$LOG" + echo "${OK} ${MAGENTA}input${RESET} group exists." else - echo "${NOTE} 'input' group doesn't exist. Creating 'input' group..." 2>&1 | tee -a "$LOG" + echo "${NOTE} ${MAGENTA}input${RESET} group doesn't exist. Creating ${MAGENTA}input${RESET} group..." sudo groupadd input - # Log the creation of the 'input' group - echo "${NOTE} 'input' group created" 2>&1 | tee -a "$LOG" + echo "${MAGENTA}input${RESET} group created" >> "$LOG" fi # Add the user to the input group sudo usermod -aG input "$(whoami)" - echo "${OK} User added to the 'input' group. Changes will take effect after you log out and log back in." 2>&1 | tee -a "$LOG" + echo "${OK} ${YELLOW}user${RESET} added to the ${MAGENTA}input${RESET} group. Changes will take effect after you log out and log back in." # Log the addition of the user to the 'input' group - echo "${NOTE} - User added to 'input' group" 2>&1 | tee -a "$LOG" + echo "User added to 'input' group" >> "$LOG" break # Break out of the loop if 'yes' is chosen - - elif [[ $choice == "n" || $choice == "N" ]]; then - echo "${NOTE} No changes made. Exiting the script." 2>&1 | tee -a "$LOG" + elif [[ $input_group_choid == "n" || $input_group_choid == "N" ]]; then + echo "${NOTE} No changes made. Exiting the script." break # Break out of the loop if 'no' is chosen else echo "${ERROR} Invalid choice. Please enter 'y' for yes or 'n' for no." fi done -clear \ No newline at end of file +printf "\n%.0s" {1..2} \ No newline at end of file diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index 2d2906f..2f09207 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -2,6 +2,15 @@ # 💫 https://github.com/JaKooLit 💫 # # Aylur's GTK Shell # +# Check if AGS is installed +if command -v ags &>/dev/null; then + AGS_VERSION=$(ags -v | awk '{print $NF}') + if [[ "$AGS_VERSION" == "1.9.0" ]]; then + echo -e "${OK} ${MAGENTA}Aylur's GTK Shell v1.9.0${RESET} is already installed. Skipping installation." + exit 0 + fi +fi + ags=( node-typescript npm @@ -33,21 +42,19 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" LOG="Install-Logs/install-$(date +%d-%H%M%S)_ags.log" MLOG="install-$(date +%d-%H%M%S)_ags2.log" +# Installation of main components +printf "\n%s - Installing ${BLUE}Aylur's GTK shell $ags_tag${RESET} Dependencies \n" "${INFO}" + # Installing ags Dependencies for PKG1 in "${ags[@]}"; do - install_package "$PKG1" 2>&1 | tee -a "$LOG" - if [ $? -ne 0 ]; then - echo -e "\033[1A\033[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs" - exit 1 - fi + install_package "$PKG1" "$LOG" done #install typescript by npm sudo npm install --global typescript 2>&1 | tee -a "$LOG" # ags - -printf "${NOTE} Install and Compiling Aylurs GTK shell $ags_tag.. \n" +printf "${INFO} Install and Compiling ${BLUE}Aylur's GTK shell $ags_tag${RESET} .. \n" # Check if folder exists and remove it if [ -d "ags" ]; then @@ -62,17 +69,18 @@ if git clone --recursive -b "$ags_tag" --depth 1 https://github.com/Aylur/ags.gi npm install meson setup build if sudo meson install -C build 2>&1 | tee -a "$MLOG"; then - printf "${OK} ags installed successfully.\n" 2>&1 | tee -a "$MLOG" + printf "${OK} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" else - echo -e "${ERROR} Installation failed for ags" 2>&1 | tee -a "$MLOG" + echo -e "${ERROR} Installation failed for ${YELLOW}Aylur's GTK shell $ags_tag${RESET}" 2>&1 | tee -a "$MLOG" fi # Move logs to Install-Logs directory mv "$MLOG" ../Install-Logs/ || true cd .. else - echo -e "${ERROR} Failed to download ags Please check your connection" 2>&1 | tee -a "$LOG" + echo -e "${ERROR} Failed to download ${YELLOW}Aylur's GTK shell $ags_tag${RESET} . Please check your connection" 2>&1 | tee -a "$LOG" mv "$MLOG" ../Install-Logs/ || true exit 1 fi +printf "\n%.0s" {1..2} \ No newline at end of file diff --git a/install-scripts/bluetooth.sh b/install-scripts/bluetooth.sh index 4fb2920..574c24f 100755 --- a/install-scripts/bluetooth.sh +++ b/install-scripts/bluetooth.sh @@ -21,13 +21,12 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" LOG="Install-Logs/install-$(date +%d-%H%M%S)_bluetooth.log" # Bluetooth -printf "${NOTE} Installing Bluetooth Packages...\n" +printf "${NOTE} Installing ${SKY_BLUE}Bluetooth${RESET} Packages...\n" for BLUE in "${blue[@]}"; do - install_package "$BLUE" 2>&1 | tee -a "$LOG" - [ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $BLUE Package installation failed, Please check the installation logs"; exit 1; } + 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" -clear +printf "\n%.0s" {1..2} diff --git a/install-scripts/dotfiles-branch.sh b/install-scripts/dotfiles-branch.sh index 27ea029..7b15d13 100644 --- a/install-scripts/dotfiles-branch.sh +++ b/install-scripts/dotfiles-branch.sh @@ -10,8 +10,9 @@ dots_tag="Deb-Untu-Dots" source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Check if Hyprland-Dots exists -printf "${NOTE} Downloading KooL's Hyprland Dots for Debian....\n" +printf "${NOTE} Cloning and Installing ${SKY_BLUE}KooL's Hyprland Dots for Debian${RESET}....\n" +# Check if Hyprland-Dots exists if [ -d Hyprland-Dots-Debian ]; then cd Hyprland-Dots-Debian git stash @@ -25,7 +26,7 @@ else chmod +x copy.sh ./copy.sh else - echo -e "$ERROR Can't download Hyprland-Dots-Debian" + echo -e "$ERROR Can't download ${YELLOW}KooL's Hyprland-Dots-Debian${RESET}" fi fi diff --git a/install-scripts/fonts.sh b/install-scripts/fonts.sh index 2ead805..514a3df 100755 --- a/install-scripts/fonts.sh +++ b/install-scripts/fonts.sh @@ -23,25 +23,23 @@ 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" + # Installation of main components -printf "\n%s - Installing fonts.... \n" "${NOTE}" +printf "\n%s - Installing necessary ${SKY_BLUE}fonts${RESET}.... \n" "${NOTE}" for PKG1 in "${fonts[@]}"; do - install_package "$PKG1" 2>&1 | tee -a "$LOG" - if [ $? -ne 0 ]; then - echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs" - exit 1 - fi + install_package "$PKG1" "$LOG" done +printf "\n%.0s" {1..2} + # jetbrains nerd font. Necessary for waybar -printf "\n%s - Downloading and Extracting Jetbrains Mono Nerd Font.... \n" "${NOTE}" DOWNLOAD_URL="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz" # Maximum number of download attempts -MAX_ATTEMPTS=3 +MAX_ATTEMPTS=2 for ((ATTEMPT = 1; ATTEMPT <= MAX_ATTEMPTS; ATTEMPT++)); do curl -OL "$DOWNLOAD_URL" 2>&1 | tee -a "$LOG" && break - echo "Download attempt $ATTEMPT failed. Retrying in 2 seconds..." 2>&1 | tee -a "$LOG" + echo "Download ${YELLOW}DOWNLOAD_URL${RESET} attempt $ATTEMPT failed. Retrying in 2 seconds..." 2>&1 | tee -a "$LOG" sleep 2 done @@ -50,12 +48,16 @@ if [ -d ~/.local/share/fonts/JetBrainsMonoNerd ]; then rm -rf ~/.local/share/fonts/JetBrainsMonoNerd 2>&1 | tee -a "$LOG" fi -mkdir -p ~/.local/share/fonts/JetBrainsMonoNerd - +mkdir -p ~/.local/share/fonts/JetBrainsMonoNerd 2>&1 | tee -a "$LOG" # Extract the new files into the JetBrainsMono folder and log the output tar -xJkf JetBrainsMono.tar.xz -C ~/.local/share/fonts/JetBrainsMonoNerd 2>&1 | tee -a "$LOG" # Update font cache and log the output fc-cache -v 2>&1 | tee -a "$LOG" -clear +# clean up +if [ -d "JetBrainsMono.tar.xz" ]; then + rm -r JetBrainsMono.tar.xz 2>&1 | tee -a "$LOG" +fi + +printf "\n%.0s" {1..2} diff --git a/install-scripts/gtk_themes.sh b/install-scripts/gtk_themes.sh index cccf58e..febaac1 100755 --- a/install-scripts/gtk_themes.sh +++ b/install-scripts/gtk_themes.sh @@ -8,6 +8,7 @@ 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 )" @@ -23,10 +24,7 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_themes.log" # installing engine needed for gtk themes for PKG1 in "${engine[@]}"; do - install_package "$PKG1" 2>&1 | tee -a "$LOG" - if [ $? -ne 0 ]; then - echo -e "\033[1A\033[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs" - exit 1 + install_package "$PKG1" "$LOG" fi done @@ -36,7 +34,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 ${SKY_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 @@ -47,4 +45,4 @@ else echo "$ERROR Download failed for GTK themes and Icons.." 2>&1 | tee -a "$LOG" fi -clear \ No newline at end of file +printf "\n%.0s" {1..2} \ No newline at end of file diff --git a/install-scripts/hypridle.sh b/install-scripts/hypridle.sh index 3bd050b..dfd0c3c 100755 --- a/install-scripts/hypridle.sh +++ b/install-scripts/hypridle.sh @@ -25,40 +25,37 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_hypridle.log" MLOG="install-$(date +%d-%H%M%S)_hypridle2.log" # Installation of dependencies -printf "\n%s - Installing hypridle dependencies.... \n" "${NOTE}" +printf "\n%s - Installing ${YELLOW}hypridle dependencies${RESET} .... \n" "${INFO}" for PKG1 in "${idle[@]}"; do install_package "$PKG1" 2>&1 | tee -a "$LOG" if [ $? -ne 0 ]; then - echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs" + echo -e "\e[1A\e[K${ERROR} - ${YELLOW}$PKG1${RESET} Package installation failed, Please check the installation logs" exit 1 fi done # Check if hypridle folder exists and remove it if [ -d "hypridle" ]; then - printf "${NOTE} Removing existing hypridle folder...\n" rm -rf "hypridle" fi # Clone and build -printf "${NOTE} Installing hypridle...\n" +printf "${INFO} Installing ${YELLOW}hypridle $idle_tag${RESET} ...\n" if git clone --recursive -b $idle_tag https://github.com/hyprwm/hypridle.git; then cd hypridle || exit 1 cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build cmake --build ./build --config Release --target hypridle -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF` if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then - printf "${OK} hypridle installed successfully.\n" 2>&1 | tee -a "$MLOG" + printf "${OK} ${MAGENTA}hypridle $idle_tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" else - echo -e "${ERROR} Installation failed for hypridle." 2>&1 | tee -a "$MLOG" + echo -e "${ERROR} Installation failed for ${YELLOW}hypridle $idle_tag${RESET}" 2>&1 | tee -a "$MLOG" fi #moving the addional logs to Install-Logs directory mv $MLOG ../Install-Logs/ || true cd .. else - echo -e "${ERROR} Download failed for hypridle." 2>&1 | tee -a "$LOG" + echo -e "${ERROR} Download failed for ${YELLOW}hypridle $idle_tag${RESET}" 2>&1 | tee -a "$LOG" fi -clear - - +printf "\n%.0s" {1..2} diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index 18226fc..e3809d8 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -29,17 +29,15 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_hyprland.log" source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Hyprland -printf "${NOTE} Installing additional Hyprland packages .......\n" +printf "${NOTE} Installing ${SKY_BLUE}Hyprland packages${RESET} .......\n" for HYPR in "${hypr[@]}"; do - install_package "$HYPR" 2>&1 | tee -a "$LOG" - [ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $HYPR Package installation failed, Please check the installation logs"; exit 1; } + install_package "$HYPR" "$LOG" done # force -printf "${NOTE} Force Installing Hyprland .......\n" +printf "${NOTE} Force Installing ${SKY_BLUE}Hyprland packages${RESET} .......\n" for HYPR1 in "${f_hypr[@]}"; do - re_install_package "$HYPR1" 2>&1 | tee -a "$LOG" - [ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $HYPR1 Package installation failed, Please check the installation logs"; exit 1; } + re_install_package "$HYPR1" "$LOG" done -clear \ No newline at end of file +printf "\n%.0s" {1..2} \ No newline at end of file diff --git a/install-scripts/hyprlock.sh b/install-scripts/hyprlock.sh index cea2a61..c6d4808 100755 --- a/install-scripts/hyprlock.sh +++ b/install-scripts/hyprlock.sh @@ -29,39 +29,33 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_hyprlock.log" MLOG="install-$(date +%d-%H%M%S)_hyprlock2.log" # Installation of dependencies -printf "\n%s - Installing hyprlock dependencies.... \n" "${NOTE}" +printf "\n%s - Installing ${YELLOW}hyprlock dependencies${RESET} .... \n" "${INFO}" for PKG1 in "${lock[@]}"; do - install_package "$PKG1" 2>&1 | tee -a "$LOG" - if [ $? -ne 0 ]; then - echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs" - exit 1 - fi + install_package "$PKG1" "$LOG" done # Check if hyprlock folder exists and remove it if [ -d "hyprlock" ]; then - printf "${NOTE} Removing existing hyprlock folder...\n" rm -rf "hyprlock" fi # Clone and build hyprlock -printf "${NOTE} Installing hyprlock...\n" +printf "${INFO} Installing ${YELLOW}hypridle $lock_tag${RESET} ...\n" if git clone --recursive -b $lock_tag https://github.com/hyprwm/hyprlock.git; then cd hyprlock || exit 1 cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build cmake --build ./build --config Release --target hyprlock -j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF` if sudo cmake --install build 2>&1 | tee -a "$MLOG" ; then - printf "${OK} hyprlock installed successfully.\n" 2>&1 | tee -a "$MLOG" + printf "${OK} ${MAGENTA}hypridle $lock_tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" else - echo -e "${ERROR} Installation failed for hyprlock." 2>&1 | tee -a "$MLOG" + echo -e "${ERROR} Installation failed for ${YELLOW}hypridle $lock_tag${RESET}" 2>&1 | tee -a "$MLOG" fi #moving the addional logs to Install-Logs directory mv $MLOG ../Install-Logs/ || true cd .. else - echo -e "${ERROR} Download failed for hyprlock." 2>&1 | tee -a "$LOG" + echo -e "${ERROR} Download failed for ${YELLOW}hypridle $lock_tag${RESET}" 2>&1 | tee -a "$LOG" fi - - +printf "\n%.0s" {1..2} diff --git a/install-scripts/imagemagick.sh b/install-scripts/imagemagick.sh deleted file mode 100755 index fd71444..0000000 --- a/install-scripts/imagemagick.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -# 💫 https://github.com/JaKooLit 💫 # -# imagemagick from source # - -depend=( - build-essential -) - - -## 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 - -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)_image.log" -MLOG="install-$(date +%d-%H%M%S)_image2.log" - -# Installing depencies -for PKG1 in "${depend[@]}"; do - install_package "$PKG1" 2>&1 | tee -a "$LOG" - if [ $? -ne 0 ]; then - echo -e "\033[1A\033[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs" - exit 1 - fi -done - -# check if Imagemagick is already installed manually -if [ -f "/usr/local/bin/magick" ]; then - echo "${NOTE} /usr/local/bin/magick already exists. skipping installation of Imagemagick." 2>&1 | tee -a "$LOG" - exit 0 -fi - -printf "${NOTE} Installing ImageMagick from source...\n" - -# Check if folder exists and remove it -if [ -d "ImageMagick" ]; then - printf "${NOTE} Removing existing ImageMagick folder...\n" - rm -rf "ImageMagick" -fi - -# Clone and build ImageMagick -printf "${NOTE} Installing ImageMagick...\n" -if git clone --depth 1 https://github.com/ImageMagick/ImageMagick.git; then - cd ImageMagick || exit 1 - ./configure - make - if sudo make install 2>&1 | tee -a "$MLOG" ; then - sudo ldconfig /usr/local/lib - printf "${OK} ImageMagick installed successfully.\n" 2>&1 | tee -a "$MLOG" - else - echo -e "${ERROR} Installation failed for ImageMagick." 2>&1 | tee -a "$MLOG" - fi - #moving the addional logs to Install-Logs directory - mv $MLOG ../Install-Logs/ || true - cd .. -else - echo -e "${ERROR} Download failed for ImageMagick." 2>&1 | tee -a "$LOG" -fi - -clear - diff --git a/install-scripts/nvidia.sh b/install-scripts/nvidia.sh index 6b8066d..b9bfc7a 100755 --- a/install-scripts/nvidia.sh +++ b/install-scripts/nvidia.sh @@ -57,13 +57,14 @@ add_to_file() { } # Install additional Nvidia packages -printf "${YELLOW} Installing Nvidia packages...\n" +printf "${YELLOW} Installing ${SKY_BLUE}Nvidia packages${RESET} ...\n" for NVIDIA in "${nvidia_pkg[@]}"; do - install_package "$NVIDIA" 2>&1 | tee -a "$LOG" + install_package "$NVIDIA" "$LOG" done -printf "${YELLOW} nvidia-stuff to /etc/default/grub..." +# adding additional nvidia-stuff +printf "${YELLOW} adding ${SKY_BLUE}nvidia-stuff${RESET} to /etc/default/grub..." # Additional options to add to GRUB_CMDLINE_LINUX additional_options="rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 rcutree.rcu_idle_gp_delay=1" @@ -106,4 +107,4 @@ printf "${YELLOW} nvidia-stuff to /etc/default/grub..." echo "Modules file ($modules_file) not found." 2>&1 | tee -a "$LOG" fi -clear +printf "\n%.0s" {1..2} diff --git a/install-scripts/nwg-look.sh b/install-scripts/nwg-look.sh deleted file mode 100755 index b8d20e9..0000000 --- a/install-scripts/nwg-look.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash -# 💫 https://github.com/JaKooLit 💫 # -# nwg-look ) # - -# nwg-look is now in trixie repo 14-Sep-2024 - -nwg_look=( - golang - libgtk-3-dev - libcairo2-dev - libglib2.0-bin -) - -# specific tags to download -nwg_tag="v0.2.7" - -## 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 - -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')_nwg-look.log" -MLOG="install-$(date +'%d-%H%M%S')_nwg-look2.log" - -# Installing NWG-Look Dependencies -for PKG1 in "${nwg_look[@]}"; do - install_package "$PKG1" 2>&1 | tee -a "$LOG" - if [ $? -ne 0 ]; then - echo -e "\033[1A\033[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs" - exit 1 - fi -done - -printf "${NOTE} Installing nwg-look\n" - -# Check if nwg-look folder exists and remove it -if [ -d "nwg-look" ]; then - printf "${NOTE} Removing existing nwg-look folder...\n" - rm -rf "nwg-look" -fi - -# Clone nwg-look repository with the specified tag -if git clone --recursive -b "$nwg_tag" --depth 1 https://github.com/nwg-piotr/nwg-look.git; then - cd nwg-look || exit 1 - # Build nwg-look - make build - if sudo make install 2>&1 | tee -a "$MLOG"; then - printf "${OK} nwg-look installed successfully.\n" 2>&1 | tee -a "$MLOG" - else - echo -e "${ERROR} Installation failed for nwg-look" 2>&1 | tee -a "$MLOG" - fi - - # Move logs to Install-Logs directory - mv "$MLOG" ../Install-Logs/ || true - cd .. -else - echo -e "${ERROR} Failed to download nwg-look. Please check your connection" 2>&1 | tee -a "$LOG" - mv "$MLOG" ../Install-Logs/ || true - exit 1 -fi - -clear diff --git a/install-scripts/rofi-wayland.sh b/install-scripts/rofi-wayland.sh index 641590e..5f9bb29 100755 --- a/install-scripts/rofi-wayland.sh +++ b/install-scripts/rofi-wayland.sh @@ -26,7 +26,7 @@ rofi=( wget ) - +rofi_tag="1.7.8+wayland1" ## 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 )" @@ -51,46 +51,43 @@ for PKG in "rofi" "bison"; do done sleep 1 -printf "\n" +printf "\n%.0s" {1..2} # Installation of main components -printf "\n%s - Installing rofi-wayland dependencies.... \n" "${NOTE}" +printf "\n%s - Installing ${SKY_BLUE}rofi-wayland dependencies${RESET}.... \n" "${INFO}" -printf "${NOTE} Force installing packages...\n" for FORCE in "${rofi[@]}"; do sudo apt-get --reinstall install -y "$FORCE" 2>&1 | tee -a "$LOG" - [ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $FORCE Package installation failed, Please check the installation logs"; exit 1; } done -printf "\n\n" - +printf "\n%.0s" {1..2} # Clone and build rofi - wayland -printf "${NOTE} Installing rofi-wayland...\n" +printf "${NOTE} Installing ${SKY_BLUE}rofi-wayland${RESET}...\n" # Check if rofi folder exists -if [ -d "rofi-1.7.5+wayland3" ]; then - rm -rf "rofi-1.7.5+wayland3" +if [ -d "$rofi_tag" ]; then + rm -rf "$rofi_tag" fi # cloning rofi-wayland -printf "${NOTE} Downloading rofi-wayland v1.7.5+wayland3 from releases...\n" -wget https://github.com/lbonn/rofi/releases/download/1.7.5%2Bwayland3/rofi-1.7.5+wayland3.tar.gz +printf "${NOTE} Downloading ${YELLOW}rofi-wayland $rofi_tag${RESET} from releases...\n" +wget https://github.com/lbonn/rofi/releases/download/1.7.8%2Bwayland1/rofi-1.7.8+wayland1.tar.gz -if [ -f "rofi-1.7.5+wayland3.tar.gz" ]; then - printf "rofi-wayland downloaded successfully.\n" 2>&1 | tee -a "$LOG" - tar xf rofi-1.7.5+wayland3.tar.gz +if [ -f "$rofi_tag.tar.gz" ]; then + printf "${OK} ${YELLOW}rofi-wayland $rofi_tag${RESET} downloaded successfully.\n" 2>&1 | tee -a "$LOG" + tar xf $rofi_tag.tar.gz fi -cd rofi-1.7.5+wayland3 || exit 1 +cd $rofi_tag || exit 1 # Proceed with the installation steps if meson setup build && ninja -C build ; then if sudo ninja -C build install 2>&1 | tee -a "$MLOG"; then printf "${OK} rofi-wayland installed successfully.\n" 2>&1 | tee -a "$MLOG" else - echo -e "${ERROR} Installation failed for rofi-wayland." 2>&1 | tee -a "$MLOG" + echo -e "${ERROR} Installation failed for ${YELLOW}rofi-wayland $rofi_tag${RESET}" 2>&1 | tee -a "$MLOG" fi else - echo -e "${ERROR} Meson setup or ninja build failed for rofi-wayland." 2>&1 | tee -a "$MLOG" + echo -e "${ERROR} Meson setup or ninja build failed for ${YELLOW}rofi-wayland $rofi_tag${RESET}" 2>&1 | tee -a "$MLOG" fi # Move logs to Install-Logs directory @@ -98,6 +95,6 @@ mv "$MLOG" ../Install-Logs/ || true cd .. || exit 1 # clean up -rm -rf rofi-1.7.5+wayland3.tar.gz +rm -rf $rofi_tag.tar.gz clear diff --git a/install-scripts/sddm.sh b/install-scripts/sddm.sh index 1221d16..a88c612 100755 --- a/install-scripts/sddm.sh +++ b/install-scripts/sddm.sh @@ -30,23 +30,14 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_sddm.log" # Install SDDM (no-recommends) -printf "\n%s - Installing sddm.... \n" "${NOTE}" +printf "\n%s - Installing ${SKY_BLUE}SDDM and dependencies${RESET} .... \n" "${NOTE}" for PKG1 in "${sddm1[@]}" ; do - sudo apt-get install --no-install-recommends -y "$PKG1" 2>&1 | tee -a "$LOG" - if [ $? -ne 0 ]; then - echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs" - exit 1 - fi + sudo apt-get install --no-install-recommends -y "$PKG1" "$LOG" done # Installation of additional sddm stuff -printf "\n%s - Installing sddm additional stuff.... \n" "${NOTE}" for PKG2 in "${sddm2[@]}"; do install_package "$PKG2" 2>&1 | tee -a "$LOG" - if [ $? -ne 0 ]; then - echo -e "\e[1A\e[K${ERROR} - $PKG2 Package installation failed, Please check the installation logs" - exit 1 - fi done # Check if other login managers are installed and disabling their service before enabling sddm @@ -74,24 +65,26 @@ printf "\n%.0s" {1..2} # SDDM-themes valid_input=false while [ "$valid_input" != true ]; do - read -n 1 -r -p "${CAT} OPTIONAL - Would you like to install SDDM themes? (y/n)" install_sddm_theme + if [[ -z $install_sddm_theme ]]; then + 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}Additional SDDM Theme${RESET}\n" "${NOTE}" - # Check if /usr/share/sddm/themes/simple-sddm exists and remove if it does - if [ -d "/usr/share/sddm/themes/simple-sddm" ]; then - sudo rm -rf "/usr/share/sddm/themes/simple-sddm" - echo -e "\e[1A\e[K${OK} - Removed existing 'simple-sddm' directory." 2>&1 | tee -a "$LOG" + # Check if /usr/share/sddm/themes/sequoia_2 exists and remove if it does + if [ -d "/usr/share/sddm/themes/sequoia_2" ]; then + sudo rm -rf "/usr/share/sddm/themes/sequoia_2" + echo -e "\e[1A\e[K${OK} - Removed existing 'sequoia_2' directory." 2>&1 | tee -a "$LOG" fi - # Check if simple-sddm directory exists in the current directory and remove if it does - if [ -d "simple-sddm" ]; then - rm -rf "simple-sddm" - echo -e "\e[1A\e[K${OK} - Removed existing 'simple-sddm' directory from the current location." 2>&1 | tee -a "$LOG" + # Check if sequoia_2 directory exists in the current directory and remove if it does + if [ -d "sequoia_2" ]; then + rm -rf "sequoia_2" + echo -e "\e[1A\e[K${OK} - Removed existing 'sequoia_2' directory from the current location." 2>&1 | tee -a "$LOG" fi - if git clone https://github.com/JaKooLit/simple-sddm.git; then - while [ ! -d "simple-sddm" ]; do + if git clone --depth 1 https://codeberg.org/JaKooLit/sddm-sequoia sequoia_2; then + while [ ! -d "sequoia_2" ]; do sleep 1 done @@ -100,10 +93,17 @@ while [ "$valid_input" != true ]; do echo -e "\e[1A\e[K${OK} - Directory '/usr/share/sddm/themes' created." 2>&1 | tee -a "$LOG" fi - sudo mv simple-sddm /usr/share/sddm/themes/ - echo -e "[Theme]\nCurrent=simple-sddm" | sudo tee "$sddm_conf_dir/theme.conf.user" &>> "$LOG" - else - echo -e "\e[1A\e[K${ERROR} - Failed to clone the theme repository. Please check your internet connection or repository availability." | tee -a "$LOG" >&2 + sudo mv sequoia_2 /usr/share/sddm/themes/sequoia_2 + echo -e "[Theme]\nCurrent=sequoia_2" | sudo tee "$sddm_conf_dir/theme.conf.user" &>> "$LOG" + + # replace current background from assets + sudo cp -r assets/sddm.png /usr/share/sddm/themes/sequoia_2/backgrounds/default + sudo sed -i 's|^wallpaper=".*"|wallpaper="backgrounds/default"|' /usr/share/sddm/themes/sequoia_2/theme.conf + + echo -e "\e[1A\e[K${OK} - ${MAGENTA}Additional SDDM Theme${RESET} successfully installed" | tee -a "$LOG" >&2 + + else + echo -e "\e[1A\e[K${ERROR} - Failed to clone the sddm theme repository. Please check your internet connection" | tee -a "$LOG" >&2 fi valid_input=true elif [[ $install_sddm_theme =~ ^[Nn]$ ]]; then @@ -113,6 +113,6 @@ while [ "$valid_input" != true ]; do printf "\n%s - Invalid input. Please enter 'y' for Yes or 'n' for No.\n" "${ERROR}" 2>&1 | tee -a "$LOG" install_sddm_theme="" fi -done +done -clear \ No newline at end of file +printf "\n%.0s" {1..2} \ No newline at end of file diff --git a/install-scripts/swww.sh b/install-scripts/swww.sh index 51825f1..694ed03 100755 --- a/install-scripts/swww.sh +++ b/install-scripts/swww.sh @@ -24,31 +24,23 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_swww.log" MLOG="install-$(date +%d-%H%M%S)_swww2.log" # Installation of swww compilation needed -printf "\n%s - Installing swww dependencies.... \n" "${NOTE}" +printf "\n%s - Installing ${SKY_BLUE}swww $swww_tag and dependencies${RESET} .... \n" "${NOTE}" for PKG1 in "${swww[@]}"; do - install_package "$PKG1" 2>&1 | tee -a "$LOG" - if [ $? -ne 0 ]; then - echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs" - exit 1 - fi + install_package "$PKG1" "$LOG" done printf "\n%.0s" {1..2} -printf "${NOTE} Installing swww\n" - # Check if swww folder exists if [ -d "swww" ]; then - printf "${NOTE} swww folder exists. Pulling latest changes...\n" cd swww || exit 1 git pull origin main 2>&1 | tee -a "$MLOG" else - printf "${NOTE} Cloning swww repository...\n" if git clone --recursive -b $swww_tag https://github.com/LGFae/swww.git; then cd swww || exit 1 else - echo -e "${ERROR} Download failed for swww" 2>&1 | tee -a "$LOG" + echo -e "${ERROR} Download failed for ${YELLOW}swww $swww_tag${RESET}" 2>&1 | tee -a "$LOG" exit 1 fi fi @@ -88,4 +80,4 @@ sudo cp -r completions/_swww /usr/share/zsh/site-functions/_swww 2>&1 | tee -a " mv "$MLOG" ../Install-Logs/ || true cd - || exit 1 -clear +printf "\n%.0s" {1..2} diff --git a/install-scripts/thunar.sh b/install-scripts/thunar.sh index 2eeadf8..17d72bd 100755 --- a/install-scripts/thunar.sh +++ b/install-scripts/thunar.sh @@ -12,6 +12,7 @@ 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 )" @@ -24,37 +25,51 @@ 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" -printf "${NOTE} Installing Thunar Packages...\n" +# Thunar +printf "${NOTE} Installing ${SKY_BLUE}Thunar${RESET} Packages...\n\n" for THUNAR in "${thunar[@]}"; do - install_package "$THUNAR" 2>&1 | tee -a "$LOG" - [ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $THUNAR Package installation failed, Please check the installation logs"; exit 1; } + install_package "$THUNAR" "$LOG" done printf "\n%.0s" {1..2} -# Ask the user if they want to use Thunar as the default file manager -read -p "${CAT} Do you want to set Thunar as the default file manager? (y/n): " thunar_default - -if [[ "$thunar_default" == [Yy] ]]; then - # Setting Thunar as the default file manager - xdg-mime default thunar.desktop inode/directory - xdg-mime default thunar.desktop application/x-wayland-gnome-saved-search - echo "${OK} Thunar has been set as the default file manager." 2>&1 | tee -a "$LOG" -else - echo "${NOTE} you choose not to set Thunar as default file manager." 2>&1 | tee -a "$LOG" +if [[ $USE_PRESET = [Yy] ]]; then + source ./preset.sh fi -printf "\n" +# Confirm if wanted to set as default +while true; do + if [[ -z $thunar_choice ]]; then + read -p "${CAT} want to set ${MAGENTA}Thunar${RESET} as the default file manager? (y/n): " thunar_choice + fi + case "$thunar_choice" in + [Yy]*) + xdg-mime default thunar.desktop inode/directory + xdg-mime default thunar.desktop application/x-wayland-gnome-saved-search + echo "${INFO} ${MAGENTA}Thunar${RESET} has been set as the default file manager." | tee -a "$LOG" + break + ;; + [Nn]*) + echo "${NOTE} You chose not to set ${MAGENTA}Thunar${RESET} as the default file manager." | tee -a "$LOG" + break + ;; + *) + echo "${WARN} Invalid input. Please enter 'y' or 'n'." + ;; + esac +done + +printf "\n%.0s" {1..1} # Check for existing configs and copy if does not exist for DIR1 in gtk-3.0 Thunar xfce4; do DIRPATH=~/.config/$DIR1 if [ -d "$DIRPATH" ]; then - echo -e "${NOTE} Config for $DIR1 found, no need to copy." 2>&1 | tee -a "$LOG" + echo -e "${NOTE} Config for ${MAGENTA}$DIR1${RESET} found, no need to copy." 2>&1 | tee -a "$LOG" else - echo -e "${NOTE} Config for $DIR1 not found, copying from assets." 2>&1 | tee -a "$LOG" - cp -r assets/$DIR1 ~/.config/ && echo "Copy $DIR1 completed!" || echo "Error: Failed to copy $DIR1 config files." 2>&1 | tee -a "$LOG" + echo -e "${NOTE} Config for ${YELLOW}$DIR1${RESET} not found, copying from assets." 2>&1 | tee -a "$LOG" + cp -r assets/$DIR1 ~/.config/ && echo "${OK} Copy $DIR1 completed!" || echo "${ERROR} Failed to copy $DIR1 config files." 2>&1 | tee -a "$LOG" fi done -clear +printf "\n%.0s" {1..2} diff --git a/install-scripts/wallust.sh b/install-scripts/wallust.sh index 873053b..f41fe2c 100755 --- a/install-scripts/wallust.sh +++ b/install-scripts/wallust.sh @@ -19,7 +19,7 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_wallust.log" mkdir -p "$(dirname "$LOG")" # Install up-to-date Rust -echo "Installing most up to date Rust compiler..." +echo "${INFO}Installing most ${YELLOW}up to date Rust compiler${RESET} ..." curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y 2>&1 | tee -a "$LOG" source "$HOME/.cargo/env" @@ -34,15 +34,15 @@ fi printf "\n%.0s" {1..2} # Install Wallust using Cargo -echo "Installing Wallust using Cargo..." | tee -a "$LOG" +echo "${INFO}Installing ${SKY_BLUE}Wallust using Cargo${RESET} ..." | tee -a "$LOG" if cargo install wallust 2>&1 | tee -a "$LOG" ; then - echo "Wallust installed successfully." | tee -a "$LOG" + echo "${OK} ${MAGENTA}Wallust${RESET} installed successfully." | tee -a "$LOG" # Move the newly compiled binary to /usr/local/bin echo "Moving Wallust binary to /usr/local/bin..." | tee -a "$LOG" sudo mv "$HOME/.cargo/bin/wallust" /usr/local/bin 2>&1 | tee -a "$LOG" else - echo "Error: Wallust installation failed. Check the log file $LOG for details." | tee -a "$LOG" + echo "${ERROR} Wallust installation failed. Check the log file $LOG for details." | tee -a "$LOG" exit 1 fi diff --git a/install-scripts/xdph.sh b/install-scripts/xdph.sh index db505ba..c50af54 100755 --- a/install-scripts/xdph.sh +++ b/install-scripts/xdph.sh @@ -18,40 +18,10 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_xdph.log" # Check if the file exists and remove it [[ -f "/usr/lib/xdg-desktop-portal-hyprland" ]] && sudo rm "/usr/lib/xdg-desktop-portal-hyprland" -printf "${NOTE} Installing xdg-desktop-portals...\n" -for portal in "${xdg[@]}"; do - install_package "$portal" 2>&1 | tee -a "$LOG" - [ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $portal Package installation failed, Please check the installation logs"; exit 1; } +# XDG-DESKTOP-PORTAL-HYPRLAND +printf "${NOTE} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland${RESET}\n\n" +for xdgs in "${xdg[@]}"; do + install_package "$xdgs" "$LOG" done - -printf "\n\n${NOTE} Checking for other XDG-Desktop-Portal-Implementations...\n" -sleep 1 -printf "${NOTE} XDG-desktop-portal-KDE & GNOME (if installed) should be manually disabled or removed! I can't remove it... sorry...\n" - -while true; do - read -rp "${CAT} Would you like to try to remove other XDG-Desktop-Portal-Implementations? (y/n) " XDPH1 - echo - sleep 1 - - case $XDPH1 in - [Yy]) - printf "${NOTE} Clearing any other xdg-desktop-portal implementations...\n" - for portal in xdg-desktop-portal-wlr xdg-desktop-portal-lxqt; do - if dpkg -l | grep -q "$portal"; then - echo "Removing $portal..." - sudo apt-get remove -y "$portal" 2>&1 | tee -a "$LOG" - fi - done - break - ;; - [Nn]) - echo "No other XDG-implementations will be removed." 2>&1 | tee -a "$LOG" - break - ;; - *) - echo "Invalid input. Please enter 'y' for yes or 'n' for no." - ;; - esac -done - -clear + +printf "\n%.0s" {1..2} diff --git a/install-scripts/zsh.sh b/install-scripts/zsh.sh index cf9819e..044451b 100755 --- a/install-scripts/zsh.sh +++ b/install-scripts/zsh.sh @@ -31,31 +31,28 @@ done # Installing zsh packages printf "${NOTE} Installing core zsh packages...${RESET}\n" for ZSHP in "${zsh[@]}"; do - install_package "$ZSHP" 2>&1 | tee -a "$LOG" - if [ $? -ne 0 ]; then - echo -e "\e[1A\e[K${ERROR} - $ZSHP Package installation failed, Please check the installation logs" - fi + install_package "$ZSHP" done -printf "\n%.0s" {1..2} +printf "\n%.0s" {1..1} ## Optional Pokemon color scripts while true; do - read -p "${CAT} Do you want to install Pokemon color scripts? (y/n): " choice - case "$choice" in + read -p "${CAT} OPTIONAL - Do you want to add ${YELLOW}Pokemon color scripts${RESET}? (y/n): " pokemon_choice + case "$pokemon_choice" in [Yy]*) if [ -d "pokemon-colorscripts" ]; then cd pokemon-colorscripts && git pull && sudo ./install.sh && cd .. else - git clone https://gitlab.com/phoneybadger/pokemon-colorscripts.git && + git clone --depth 1 https://gitlab.com/phoneybadger/pokemon-colorscripts.git && cd pokemon-colorscripts && sudo ./install.sh && cd .. fi sed -i '/#pokemon-colorscripts --no-title -s -r/s/^#//' assets/.zshrc >> "$LOG" 2>&1 # commenting out fastfetch since pokemon was chosen to install sed -i '/^fastfetch -c $HOME\/.config\/fastfetch\/config-compact.jsonc/s/^/#/' assets/.zshrc >> "$LOG" 2>&1 - - echo "${NOTE} Pokemon Installation process completed" 2>&1 | tee -a "$LOG" + + echo "${NOTE} ${MAGENTA}Pokemon-colorscripts${RESET} installation process completed" 2>&1 | tee -a "$LOG" break ;; [Nn]*) @@ -72,46 +69,46 @@ printf "\n" # Install Oh My Zsh, plugins, and set zsh as default shell if command -v zsh >/dev/null; then - printf "${NOTE} Installing Oh My Zsh and plugins...\n" - if [ ! -d "$HOME/.oh-my-zsh" ]; then - sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended || true - else - echo "Directory .oh-my-zsh already exists. Skipping re-installation." 2>&1 | tee -a "$LOG" - fi - # Check if the directories exist before cloning the repositories - if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ]; then - git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions || true - else - echo "Directory zsh-autosuggestions already exists. Skipping cloning." 2>&1 | tee -a "$LOG" - fi + printf "${NOTE} Installing ${SKY_BLUE}Oh My Zsh and plugins${RESET} ...\n" + if [ ! -d "$HOME/.oh-my-zsh" ]; then + sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended || true + else + echo "${INFO} Directory .oh-my-zsh already exists. Skipping re-installation." 2>&1 | tee -a "$LOG" + fi + # Check if the directories exist before cloning the repositories + if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ]; then + git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions || true + else + echo "${INFO} Directory zsh-autosuggestions already exists. Skipping cloning." 2>&1 | tee -a "$LOG" + fi - if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ]; then - git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting || true - else - echo "Directory zsh-syntax-highlighting already exists. Skipping cloning." 2>&1 | tee -a "$LOG" - fi - - # Check if ~/.zshrc and .zprofile exists, create a backup, and copy the new configuration - if [ -f "$HOME/.zshrc" ]; then - cp -b "$HOME/.zshrc" "$HOME/.zshrc-backup" || true - fi + if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ]; then + git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting || true + else + echo "${INFO} Directory zsh-syntax-highlighting already exists. Skipping cloning." 2>&1 | tee -a "$LOG" + fi + + # Check if ~/.zshrc and .zprofile exists, create a backup, and copy the new configuration + if [ -f "$HOME/.zshrc" ]; then + cp -b "$HOME/.zshrc" "$HOME/.zshrc-backup" || true + fi - if [ -f "$HOME/.zprofile" ]; then - cp -b "$HOME/.zprofile" "$HOME/.zprofile-backup" || true - fi + if [ -f "$HOME/.zprofile" ]; then + cp -b "$HOME/.zprofile" "$HOME/.zprofile-backup" || true + fi + + # Copying the preconfigured zsh themes and profile + cp -r 'assets/.zshrc' ~/ + cp -r 'assets/.zprofile' ~/ - cp -r 'assets/.zshrc' ~/ - cp -r 'assets/.zprofile' ~/ - - printf "${NOTE} Changing default shell to zsh...\n" - - while ! chsh -s $(which zsh); do - echo "${ERROR} Authentication failed. Please enter the correct password." - sleep 1 - done - printf "\n" - printf "${NOTE} Shell changed successfully to zsh.\n" 2>&1 | tee -a "$LOG" + 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 "${INFO} Shell changed successfully to ${MAGENTA}zsh${RESET}" 2>&1 | tee -a "$LOG" fi -clear +printf "\n%.0s" {1..2}