From 5052416f0830459b0c44529b5380e00830faf4cc Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sat, 30 Dec 2023 15:07:24 +0900 Subject: [PATCH] Making Pokemon Color Script as optional --- assets/.zshrc | 2 +- install-scripts/InputGroup.sh | 2 +- install-scripts/gtk_themes.sh | 2 ++ install-scripts/zsh.sh | 32 ++++++++++++++++++++++++++++++-- install.sh | 24 +++++++++++++----------- 5 files changed, 47 insertions(+), 15 deletions(-) diff --git a/assets/.zshrc b/assets/.zshrc index 167d176..0cc0d55 100644 --- a/assets/.zshrc +++ b/assets/.zshrc @@ -20,7 +20,7 @@ source $ZSH/oh-my-zsh.sh # Display Pokemon-colorscripts # Project page: https://gitlab.com/phoneybadger/pokemon-colorscripts#on-other-distros-and-macos -pokemon-colorscripts --no-title -s -r +#pokemon-colorscripts --no-title -s -r ### From this line is for pywal-colors diff --git a/install-scripts/InputGroup.sh b/install-scripts/InputGroup.sh index a3ebfee..b98c995 100755 --- a/install-scripts/InputGroup.sh +++ b/install-scripts/InputGroup.sh @@ -1,6 +1,6 @@ #!/bin/bash # 💫 https://github.com/JaKooLit 💫 # -# Adding users into group # +# Adding users into input group # ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## diff --git a/install-scripts/gtk_themes.sh b/install-scripts/gtk_themes.sh index e77a476..3082f38 100755 --- a/install-scripts/gtk_themes.sh +++ b/install-scripts/gtk_themes.sh @@ -1,4 +1,6 @@ #!/bin/bash +# 💫 https://github.com/JaKooLit 💫 # +# GTK Themes. Sourcing from a different Repo # engine=( unzip diff --git a/install-scripts/zsh.sh b/install-scripts/zsh.sh index 80e1187..cbbf853 100755 --- a/install-scripts/zsh.sh +++ b/install-scripts/zsh.sh @@ -1,11 +1,10 @@ #!/bin/bash # 💫 https://github.com/JaKooLit 💫 # -# zsh and oh my zsh # +# zsh and oh my zsh including pokemon-color-scripts# zsh=( zsh zsh-completions -pokemon-colorscripts-git ) @@ -22,6 +21,25 @@ 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" +## Optional Pokemon color scripts +while true; do + read -p "${CAT} OPTIONAL - Do you want to add Pokemon color scripts? (y/n): " choice + case "$choice" in + [Yy]*) + zsh+=('pokemon-colorscripts-git') + sed -i '/#pokemon-colorscripts --no-title -s -r/s/^#//' assets/.zshrc + break + ;; + [Nn]*) + echo "${NOTE}Skipping Pokemon color scripts installation.${RESET}" 2>&1 | tee -a "$LOG" + break + ;; + *) + echo "${WARN}Please enter 'y' for yes or 'n' for no.${RESET}" + ;; + esac +done + # Installing zsh packages printf "${NOTE} Installing core zsh packages...${RESET}\n" for ZSH in "${zsh[@]}"; do @@ -52,7 +70,17 @@ if command -v zsh >/dev/null; then 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 [ -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' ~/ diff --git a/install.sh b/install.sh index a9e4b90..26c95e4 100755 --- a/install.sh +++ b/install.sh @@ -121,7 +121,7 @@ execute_script() { printf "\n" ask_custom_option "-Type AUR helper" "paru or yay" aur_helper printf "\n" -ask_yes_no "-Do you have nvidia gpu?" nvidia +ask_yes_no "-Do you have any nvidia gpu in your system?" nvidia printf "\n" ask_yes_no "-Install GTK themes (required for Dark/Light function)?" gtk_themes printf "\n" @@ -129,22 +129,24 @@ ask_yes_no "-Do you want to configure Bluetooth?" bluetooth printf "\n" ask_yes_no "-Do you want to install Thunar file manager?" thunar printf "\n" -ask_yes_no "-Installing in Asus ROG Laptops?" rog -printf "\n" -ask_yes_no "-Install and configure SDDM log-in Manager?" sddm +ask_yes_no "-Install & configure SDDM log-in Manager w/ (Optional) SDDM Theme?" sddm printf "\n" ask_yes_no "-Install XDG-DESKTOP-PORTAL-HYPRLAND? (For proper Screen Share ie OBS)" xdph printf "\n" -ask_yes_no "-Install zsh, oh-my-zsh & pokemon-colorscripts?" zsh +ask_yes_no "-Install zsh, oh-my-zsh & (Optional) pokemon-colorscripts?" zsh printf "\n" -ask_yes_no "-Do you want to copy Hyprland dotfiles?" dots +ask_yes_no "-Installing in a Asus ROG Laptops?" rog printf "\n" +ask_yes_no "-Do you want to download pre-configured Hyprland dotfiles?" dots +printf "\n" + # Ensuring all in the scripts folder are made executable chmod +x install-scripts/* -# Execute AUR helper script based on user choice +# Ensuring base-devel is installed execute_script "00-base.sh" +# Execute AUR helper script based on user choice if [ "$aur_helper" == "paru" ]; then execute_script "paru.sh" elif [ "$aur_helper" == "yay" ]; then @@ -177,10 +179,6 @@ if [ "$thunar" == "Y" ]; then execute_script "thunar.sh" fi -if [ "$rog" == "Y" ]; then - execute_script "rog.sh" -fi - if [ "$sddm" == "Y" ]; then execute_script "sddm.sh" fi @@ -195,6 +193,10 @@ fi execute_script "InputGroup.sh" +if [ "$rog" == "Y" ]; then + execute_script "rog.sh" +fi + if [ "$dots" == "Y" ]; then execute_script "dotfiles.sh"