From 9abf9a459d31f0e82777bbac873e75a9b9ae02c6 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Wed, 8 May 2024 11:10:17 +0900 Subject: [PATCH] Tweaked Script including sddm.sh --- CHANGELOGS.md | 4 ++++ install-scripts/sddm.sh | 16 +++++++++------- install.sh | 22 ++++++++++++---------- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/CHANGELOGS.md b/CHANGELOGS.md index 9724388..88c289f 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -1,5 +1,9 @@ ## Changelogs +## 08 May 2024 +- Adjusted sddm.sh since it does not respect preset.sh +- install.sh have been rearranged so it quits if user choose not to proceed + ## 07 May 2024 - Minor typo change on nvidia.sh - switch back to cava since installing cava-git keep it hanging (see known-issue on readme) diff --git a/install-scripts/sddm.sh b/install-scripts/sddm.sh index bcd584e..6ba67d9 100755 --- a/install-scripts/sddm.sh +++ b/install-scripts/sddm.sh @@ -8,9 +8,9 @@ fi sddm=( qt6-5compat qt6-declarative - qt6-svg + qt6-svg sddm -) +) ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## @@ -57,25 +57,27 @@ sudo cp assets/hyprland.desktop "$wayland_sessions_dir/" 2>&1 | tee -a "$LOG" # 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 SDDM themes? (y/n)" install_sddm_theme + fi if [[ $install_sddm_theme =~ ^[Yy]$ ]]; then printf "\n%s - Installing Simple SDDM Theme\n" "${NOTE}" - # Check if /usr/share/sddm/themes/simple-sddm exists and remove if it does + # Check if /usr/share/sddm/themes/simple-sddm-2 exists and remove if it does if [ -d "/usr/share/sddm/themes/simple-sddm-2" ]; then sudo rm -rf "/usr/share/sddm/themes/simple-sddm-2" echo -e "\e[1A\e[K${OK} - Removed existing 'simple-sddm-2' directory." 2>&1 | tee -a "$LOG" fi - # Check if simple-sddm directory exists in the current directory and remove if it does + # Check if simple-sddm-2 directory exists in the current directory and remove if it does if [ -d "simple-sddm-2" ]; then rm -rf "simple-sddm-2" echo -e "\e[1A\e[K${OK} - Removed existing 'simple-sddm-2' directory from the current location." 2>&1 | tee -a "$LOG" fi - if git clone https://github.com/JaKooLit/simple-sddm-2.git; then + if git clone --depth 1 https://github.com/JaKooLit/simple-sddm-2.git; then while [ ! -d "simple-sddm-2" ]; do - sleep 1 + sleep 1 done if [ ! -d "/usr/share/sddm/themes" ]; then diff --git a/install.sh b/install.sh index 22e29c1..2ada388 100755 --- a/install.sh +++ b/install.sh @@ -27,22 +27,19 @@ echo read -p "$(tput setaf 6)Would you like to proceed? (y/n): $(tput sgr0)" proceed printf "\n%.0s" {1..2} -echo "$(tput bold)$(tput setaf 7)Choose Y to use preset ONLY once you reviewed, updated or updated the preset.sh $(tput sgr0)" -echo "$(tput bold)$(tput setaf 7)If you are not sure what to do, choose N in the "Use Preset Settings" question $(tput sgr0)" -printf "\n%.0s" {1..1} -read -p "$(tput setaf 6)Would you like to Use Preset Settings? (y/n): $(tput sgr0)" use_preset - -printf "\n%.0s" {1..3} if [ "$proceed" != "y" ]; then echo "Installation aborted." + printf "\n%.0s" {1..2} exit 1 fi -# Create Directory for Install Logs -if [ ! -d Install-Logs ]; then - mkdir Install-Logs -fi +printf "\n%.0s" {1..2} + +echo "$(tput bold)$(tput setaf 166)ATTENTION: Choose Y to use preset ONLY once you reviewed, updated or updated the preset.sh $(tput sgr0)" +echo "$(tput bold)$(tput setaf 7)If you are not sure what to do, choose N in the Use Preset Settings $(tput sgr0)" +printf "\n%.0s" {1..1} +read -p "$(tput setaf 6)Would you like to Use Preset Settings? (y/n): $(tput sgr0)" use_preset # Use of Preset Settings if [[ $use_preset = [Yy] ]]; then @@ -82,6 +79,11 @@ LOG="install-$(date +%d-%H%M%S).log" # xdph="" # zsh="" +# Create Directory for Install Logs +if [ ! -d Install-Logs ]; then + mkdir Install-Logs +fi + # Define the directory where your scripts are located script_directory=install-scripts