From 178b1a7528780d32cb1012febc548acd368d45ba Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Fri, 7 Feb 2025 00:18:01 +0900 Subject: [PATCH] RC1 --- CHANGELOGS.md | 8 +- README.md | 18 +++++ install-scripts/InputGroup.sh | 50 +++--------- install-scripts/sddm.sh | 68 ++-------------- install-scripts/sddm_theme.sh | 66 +++++++++++++++ install-scripts/thunar.sh | 28 ------- install-scripts/thunar_default.sh | 25 ++++++ install-scripts/zsh.sh | 31 ------- install-scripts/zsh_pokemon.sh | 35 ++++++++ install.sh | 129 +++++++++++++++++++++--------- preset.sh | 46 +++++++++++ 11 files changed, 304 insertions(+), 200 deletions(-) create mode 100755 install-scripts/sddm_theme.sh create mode 100755 install-scripts/thunar_default.sh create mode 100755 install-scripts/zsh_pokemon.sh create mode 100644 preset.sh diff --git a/CHANGELOGS.md b/CHANGELOGS.md index 221c426..d448276 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -1,8 +1,12 @@ ## Changelogs +## 06 Feb 2025 +- added semi-unattended function. +- move all the initial questions at the beginning + ## 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 +- Re-coded for better visibility +- Offered a new SDDM theme. - script will automatically detect if you have nvidia but script still offer if you want to set up for user ## 30 Jan 2025 diff --git a/README.md b/README.md index e5602d5..5dea704 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,24 @@ chmod +x install.sh

+ +### 🤟 semi-unattended installation (new for 2025) +- edit preset.sh to modify what packages you want. Make sure to change only with Y or N +- to use preset instead of usual `./install.sh` you can ran like this + +```bash +./install.sh --preset +``` + +- 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 + + #### ✨ 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-scripts/InputGroup.sh b/install-scripts/InputGroup.sh index c029f08..71f9459 100755 --- a/install-scripts/InputGroup.sh +++ b/install-scripts/InputGroup.sh @@ -2,10 +2,6 @@ # 💫 https://github.com/JaKooLit 💫 # # 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 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -19,43 +15,17 @@ 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" -# Checking if current user is in the 'input' group -if groups "$(whoami)" | grep -q '\binput\b'; then - echo "USER $(whoami) is already in the 'input' group." 2>&1 > "$LOG" - exit 0 +# Check if the 'input' group exists +if grep -q '^input:' /etc/group; then + echo "${OK} ${MAGENTA}input${RESET} group exists." +else + echo "${NOTE} ${MAGENTA}input${RESET} group doesn't exist. Creating ${MAGENTA}input${RESET} group..." + sudo groupadd input + echo "${MAGENTA}input${RESET} group created" >> "$LOG" fi -while true; do - echo "${WARN} This script will add your ${YELLOW}user${RESET} to the ${MAGENTA}input${RESET} group." - echo "${NOTE} Please note that adding yourself to the ${MAGENTA}input${RESET} group might be necessary for ${MAGENTA}waybar keyboard-state functionality${RESET} ." - - 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 [[ $input_group_choid == "y" || $input_group_choid == "Y" ]]; then - if grep -q '^input:' /etc/group; then - echo "${OK} ${MAGENTA}input${RESET} group exists." - else - echo "${NOTE} ${MAGENTA}input${RESET} group doesn't exist. Creating ${MAGENTA}input${RESET} group..." - sudo groupadd input - - echo "${MAGENTA}input${RESET} group created" >> "$LOG" - fi - - sudo usermod -aG input "$(whoami)" - echo "${OK} ${YELLOW}user${RESET} added to the ${MAGENTA}input${RESET} group. Changes will take effect after you log out and log back in." - - echo "User added to 'input' group" >> "$LOG" - break - elif [[ $input_group_choid == "n" || $input_group_choid == "N" ]]; then - echo "${NOTE} No changes made. Exiting the script." - break - else - echo "${ERROR} Invalid choice. Please enter 'y' for yes or 'n' for no." - fi -done +# Add the user to the 'input' group +sudo usermod -aG input "$(whoami)" +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" printf "\n%.0s" {1..2} \ No newline at end of file diff --git a/install-scripts/sddm.sh b/install-scripts/sddm.sh index d3713dc..3664229 100755 --- a/install-scripts/sddm.sh +++ b/install-scripts/sddm.sh @@ -38,11 +38,12 @@ for PKG2 in "${sddm2[@]}"; do install_package "$PKG2" "$LOG" done -# Check if other login managers are installed and disabling their service before enabling sddm -for login_manager in lightdm gdm lxdm lxdm-gtk3; do - if sudo apt list installed "$login_manager" > /dev/null; then - echo "disabling $login_manager..." +# Check if other login managers are installed and disable their service before enabling SDDM +for login_manager in lightdm gdm3 gdm lxdm xdm lxdm-gtk3; do + if sudo apt list --installed "$login_manager" > /dev/null; then + echo "Disabling $login_manager..." sudo systemctl disable "$login_manager.service" 2>&1 | tee -a "$LOG" + echo "$login_manager disabled." fi done @@ -60,62 +61,3 @@ sudo cp assets/hyprland.desktop "$wayland_sessions_dir/" 2>&1 | tee -a "$LOG" printf "\n%.0s" {1..2} -# SDDM-themes -valid_input=false -while [ "$valid_input" != true ]; do - if [[ -z $install_sddm_theme ]]; then - read -n 1 -r -p "${CAT} OPTIONAL - Would you like to install ${YELLOW}additional SDDM themes?${RESET} (y/n)" install_sddm_theme - fi - if [[ $install_sddm_theme =~ ^[Yy]$ ]]; then - printf "\n%s - Installing ${SKY_BLUE}Additional SDDM Theme${RESET}\n" "${NOTE}" - - # 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 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 --depth 1 https://codeberg.org/JaKooLit/sddm-sequoia sequoia_2; then - while [ ! -d "sequoia_2" ]; do - sleep 1 - done - - if [ ! -d "/usr/share/sddm/themes" ]; then - sudo mkdir -p /usr/share/sddm/themes - echo -e "\e[1A\e[K${OK} - Directory '/usr/share/sddm/themes' created." 2>&1 | tee -a "$LOG" - fi - - 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 - - # Copy Nerd Fonts (necessary for icons to properly show) - printf "\n%s - Copying nerd font to /usr inoder for the new theme to have a proper icons\n" "${NOTE}" - sudo cp -r "$HOME/.local/share/fonts/JetBrainsMonoNerd" /usr/local/share/fonts/ - fc-cache -fv | tee -a "$LOG" >&2 - - 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 - printf "\n%s - No SDDM themes will be installed.\n" "${NOTE}" 2>&1 | tee -a "$LOG" - valid_input=true - else - 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 - -printf "\n%.0s" {1..2} \ No newline at end of file diff --git a/install-scripts/sddm_theme.sh b/install-scripts/sddm_theme.sh new file mode 100755 index 0000000..517e5a9 --- /dev/null +++ b/install-scripts/sddm_theme.sh @@ -0,0 +1,66 @@ +#!/bin/bash +# 💫 https://github.com/JaKooLit 💫 # +# SDDM themes # + +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 + +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" + +# SDDM-themes +printf "${INFO} Installing ${SKY_BLUE}Additional SDDM Theme${RESET}\n" + +# Check if /usr/share/sddm/themes/$theme_name exists and remove if it does +if [ -d "/usr/share/sddm/themes/$theme_name" ]; then + sudo rm -rf "/usr/share/sddm/themes/$theme_name" + echo -e "\e[1A\e[K${OK} - Removed existing $theme_name directory." 2>&1 | tee -a "$LOG" +fi + +# Check if $theme_name directory exists in the current directory and remove if it does +if [ -d "$theme_name" ]; then + rm -rf "$theme_name" + echo -e "\e[1A\e[K${OK} - Removed existing $theme_name directory from the current location." 2>&1 | tee -a "$LOG" +fi + +# Clone the repository +if git clone --depth 1 "$source_theme" "$theme_name"; then + if [ ! -d "$theme_name" ]; then + echo "${ERROR} Failed to clone the repository." | tee -a "$LOG" + fi + + # Create themes directory if it doesn't exist + if [ ! -d "/usr/share/sddm/themes" ]; then + sudo mkdir -p /usr/share/sddm/themes + echo "${OK} - Directory '/usr/share/sddm/themes' created." | tee -a "$LOG" + fi + + # Move cloned theme to the themes directory + sudo mv "$theme_name" "/usr/share/sddm/themes/$theme_name" 2>&1 | tee -a "$LOG" + + # Configure theme settings + echo -e "[Theme]\nCurrent=$theme_name" | sudo tee "$sddm_conf_dir/theme.conf.user" >> "$LOG" + + # Replace current background from assets + sudo cp -r assets/sddm.png "/usr/share/sddm/themes/$theme_name/backgrounds/default" 2>&1 | tee -a "$LOG" + sudo sed -i 's|^wallpaper=".*"|wallpaper="backgrounds/default"|' "/usr/share/sddm/themes/$theme_name/theme.conf" 2>&1 | tee -a "$LOG" + + echo "${OK} - ${MAGENTA}Additional SDDM Theme${RESET} successfully installed." | tee -a "$LOG" + +else + + echo "${ERROR} - Failed to clone the sddm theme repository. Please check your internet connection." | tee -a "$LOG" >&2 +fi + + +printf "\n%.0s" {1..2} \ No newline at end of file diff --git a/install-scripts/thunar.sh b/install-scripts/thunar.sh index 7991993..3e9d35d 100755 --- a/install-scripts/thunar.sh +++ b/install-scripts/thunar.sh @@ -31,34 +31,6 @@ printf "${NOTE} Installing ${SKY_BLUE}Thunar${RESET} Packages...\n\n" install_package "$THUNAR" "$LOG" done -printf "\n%.0s" {1..2} - -if [[ $USE_PRESET = [Yy] ]]; then - source ./preset.sh -fi - -# 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 "${OK} ${MAGENTA}Thunar${RESET} is now 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 diff --git a/install-scripts/thunar_default.sh b/install-scripts/thunar_default.sh new file mode 100755 index 0000000..576e76c --- /dev/null +++ b/install-scripts/thunar_default.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# 💫 https://github.com/JaKooLit 💫 # +# Thunar-default # + + +## 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)_thunar-default.log" + +printf "${INFO} Setting ${SKY_BLUE}Thunar${RESET} as default file manager...\n" + +xdg-mime default thunar.desktop inode/directory +xdg-mime default thunar.desktop application/x-wayland-gnome-saved-search +echo "${OK} ${MAGENTA}Thunar${RESET} is now set as the default file manager." | tee -a "$LOG" + +printf "\n%.0s" {1..2} diff --git a/install-scripts/zsh.sh b/install-scripts/zsh.sh index f4b6c28..028bd40 100755 --- a/install-scripts/zsh.sh +++ b/install-scripts/zsh.sh @@ -36,37 +36,6 @@ done printf "\n%.0s" {1..1} -## Optional Pokemon color scripts -while true; do - 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 --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} ${MAGENTA}Pokemon-colorscripts${RESET} installation process completed" 2>&1 | tee -a "$LOG" - break - ;; - [Nn]*) - echo "${MAGENTA} You chose not to install Pokemon Color Scripts." 2>&1 | tee -a "$LOG" - break - ;; - *) - echo "Please enter 'y' for yes or 'n' for no." 2>&1 | tee -a "$LOG" - ;; - esac -done - -printf "\n" - # Install Oh My Zsh, plugins, and set zsh as default shell if command -v zsh >/dev/null; then printf "${NOTE} Installing ${SKY_BLUE}Oh My Zsh and plugins${RESET} ...\n" diff --git a/install-scripts/zsh_pokemon.sh b/install-scripts/zsh_pokemon.sh new file mode 100755 index 0000000..62c1b5e --- /dev/null +++ b/install-scripts/zsh_pokemon.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# 💫 https://github.com/JaKooLit 💫 # +# 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 + +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" + +printf "${INFO} Installing ${SKY_BLUE}Pokemon color scripts${RESET} ..." + +if [ -d "pokemon-colorscripts" ]; then + cd pokemon-colorscripts && git pull && sudo ./install.sh && cd .. + else + git clone --depth 1 https://gitlab.com/phoneybadger/pokemon-colorscripts.git && + cd pokemon-colorscripts && sudo ./install.sh && cd .. +fi + +# Check if ~/.zshrc exists +if [ -f "$HOME/.zshrc" ]; then + sed -i '/#pokemon-colorscripts --no-title -s -r/s/^#//' "$HOME/.zshrc" >> "$LOG" 2>&1 + sed -i '/^fastfetch -c $HOME\/.config\/fastfetch\/config-compact.jsonc/s/^/#/' "$HOME/.zshrc" >> "$LOG" 2>&11 +else + echo "$HOME/.zshrc not found. Cant enable ${YELLOW}Pokemon color scripts${RESET}" >> "$LOG" 2>&1 +fi + +printf "\n%.0s" {1..2} diff --git a/install.sh b/install.sh index efe057d..3cc0e37 100755 --- a/install.sh +++ b/install.sh @@ -42,7 +42,16 @@ if is_ubuntu; then exit 1 fi -clear +# Check if --preset argument is provided +if [[ "$1" == "--preset" ]]; then + + # nvidia + if [[ "$2" == "--nvidia" ]]; then + sed -i 's/^nvidia=".*"/nvidia="Y"/' preset.sh + fi + + source ./preset.sh +fi printf "\n%.0s" {1..2} echo -e "\e[35m @@ -113,6 +122,16 @@ 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 @@ -146,7 +165,7 @@ execute_script() { if [ -f "$script_path" ]; then chmod +x "$script_path" if [ -x "$script_path" ]; then - "$script_path" + env USE_PRESET=$use_preset "$script_path" else echo "Failed to make script '$script' executable." fi @@ -158,33 +177,38 @@ execute_script() { # 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 fi + 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} login manager, plus (OPTIONAL) SDDM theme?" sddm -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}, ${YELLOW}oh-my-zsh${RESET} & (Optional) ${YELLOW}pokemon-colorscripts${RESET}?" zsh -printf "\n" -ask_yes_no "-Installing on ${YELLOW}Asus ROG laptops${RESET}?" rog -printf "\n" -ask_yes_no "-Do you want to download pre-configured ${YELLOW}KooL's Hyprland dotfiles?${RESET}" dots -printf "\n" - -# Ensuring all in the scripts folder are made executable -chmod +x install-scripts/* +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 @@ -200,9 +224,32 @@ if [ "$sddm" == "y" ] || [ "$sddm" == "Y" ]; then fi done fi +if [[ "$sddm" == "Y" ]]; then + ask_yes_no "-Download and Install ${YELLOW}SDDM Theme?${RESET} " sddm_theme +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 +fi + +printf "\n" +ask_yes_no "-Installing on ${YELLOW}Asus ROG laptops?${RESET}" rog + +printf "\n" +ask_yes_no "-Do you want to add pre-configured ${YELLOW}KooL's Hyprland dotfiles?${RESET}" dots + +printf "\n" + +# Ensuring all in the scripts folder are made executable +chmod +x install-scripts/* sleep 1 + sudo apt update # execute pre clean up @@ -241,6 +288,9 @@ 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" @@ -249,25 +299,30 @@ 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 [ "$nwg" == "Y" ]; then -# execute_script "nwg-look.sh" -#fi +if [ "$input_group" == "Y" ]; then + execute_script "InputGroup.sh" +fi if [ "$rog" == "Y" ]; then execute_script "rog.sh" fi -execute_script "InputGroup.sh" - if [ "$dots" == "Y" ]; then execute_script "dotfiles-branch.sh" fi @@ -298,37 +353,39 @@ if dpkg -l | grep -qw hyprland; then 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 "\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" printf "\n${NOTE} However, it is ${YELLOW}highly recommended to reboot${RESET} your system.\n\n" - # Prompt user to reboot read -rp "${CAT} Would you like to reboot now? (y/n): " HYP - # Normalize user input to lowercase HYP=$(echo "$HYP" | tr '[:upper:]' '[:lower:]') if [[ "$HYP" == "y" || "$HYP" == "yes" ]]; then echo "${INFO} Rebooting now..." - systemctl reboot # Optionally reboot if the user agrees + systemctl reboot elif [[ "$HYP" == "n" || "$HYP" == "no" ]]; then - echo "${INFO} You can reboot later at any time." + 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 + echo "${INFO} HOWEVER ${YELLOW}NVIDIA GPU${RESET} detected. Reminder that you must REBOOT your SYSTEM..." + printf "\n%.0s" {1..1} + fi else echo "${WARN} Invalid response. Please answer with 'y' or 'n'. Exiting." exit 1 fi - - # Check if NVIDIA GPU is present - if lspci | grep -i "nvidia" &> /dev/null; then - echo "${INFO} ${YELLOW}NVIDIA GPU${RESET} detected. Reminder that you must REBOOT your SYSTEM..." - else - echo -e "\n${CAT} Thanks for using ${MAGENTA}KooL's Hyprland Dots${RESET}. Enjoy and Have a good day!" - printf "\n%.0s" {1..3} - exit 0 - fi else # Print error message if neither package is installed - printf "\n${WARN} Hyprland failed to install. Please check 00_CHECK-time_installed.log and other files in the Install-Logs/ directory...\n\n" - printf "\n%.0s" {1..2} + printf "\n${WARN} Hyprland is NOT installed. Please check 00_CHECK-time_installed.log and other files in the Install-Logs/ directory..." + printf "\n%.0s" {1..3} exit 1 fi +printf "\n%.0s" {1..2} + diff --git a/preset.sh b/preset.sh new file mode 100644 index 0000000..d9f13a1 --- /dev/null +++ b/preset.sh @@ -0,0 +1,46 @@ +# 💫 https://github.com/JaKooLit 💫 # + +## -- Make sure you use the right answer or install script will fail ### +# Use only Y for Yes and N for No . If you put other letter, the script will fail + + +###-Configure NVIDIA +nvidia="N" + +###-Install GTK themes (required for Dark/Light function)? +gtk_themes="Y" + +###-Do you want to configure Bluetooth? +bluetooth="Y" + +###-Do you want to install Thunar file manager? +thunar="Y" +### Do you want to set Thunar as the default file manager? +thunar_choice="Y" + + +### Adding user to the 'input' group might be necessary for waybar keyboard-state functionality +input_group="Y" + +### Install AGS (aylur's GTK shell) v1 for Desktop-Like Overview?" +ags="Y" + +###-Install & configure SDDM log-in Manager +sddm="Y" +### install and download SDDM themes +sddm_theme="Y" + +###-Install XDG-DESKTOP-PORTAL-HYPRLAND? (For proper Screen Share ie OBS) +xdph="Y" + +###-Install zsh, oh-my-zsh +zsh="Y" + +### add Pokemon color scripts to terminal +pokemon_choice="Y" + +###-Installing on Asus ROG Laptops? +rog="N" + +###-Do you want to add pre-configured KooL's Hyprland dotfiles? +dots="Y"