diff options
| author | Ja.KooLit <jimmielovejay@gmail.com> | 2023-12-13 16:28:32 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-13 16:28:32 +0900 |
| commit | b7fb294dc2cce028155af9e6c2ad8ebf4e86983b (patch) | |
| tree | b3736199921d6ca5d7b96d0b698902d967fb27a7 /copy.sh | |
| parent | a40f1d2057d28d610c9d975081c012f9f136d270 (diff) | |
| parent | 9b3ab5b640da1e065ecbf46dc40b1588176c77b5 (diff) | |
Merge pull request #70 from JaKooLit/development
tweaked copy.sh
Diffstat (limited to 'copy.sh')
| -rwxr-xr-x | copy.sh | 42 |
1 files changed, 30 insertions, 12 deletions
@@ -178,20 +178,38 @@ chmod +x ~/.config/hypr/scripts/* 2>&1 | tee -a "$LOG" chmod +x ~/.config/hypr/initial-boot.sh 2>&1 | tee -a "$LOG" printf "\n%.0s" {1..3} -# Additional wallpaper + +# additional wallpapers echo "$(tput setaf 6) By default only a few wallpapers are copied...$(tput sgr0)" -read -n1 -rep "${CAT} Would you like to download additional wallpapers? (y/n)" WALL -sleep 1 +printf "\n%.0s" {1..2} -if [[ $WALL =~ ^[Yy]$ ]]; then - printf "${NOTE} Downloading additional wallpapers...\n" - if git clone https://github.com/JaKooLit/Wallpaper-Bank.git 2>&1 | tee -a "$LOG"; then - cp -R Wallpaper-Bank/wallpapers/* ~/Pictures/wallpapers/ - rm -rf Wallpaper-Bank # Remove cloned repository after copying wallpapers - else - echo "${ERROR} Downloading additional wallpapers failed" 2>&1 | tee -a "$LOG" - fi -fi +while true; do + read -rp "${CAT} Would you like to download additional wallpapers? (y/n)" WALL + case $WALL in + [Yy]) + echo "${NOTE} Downloading additional wallpapers..." + if git clone https://github.com/JaKooLit/Wallpaper-Bank.git 2>&1 | tee -a "$LOG"; then + if cp -R Wallpaper-Bank/wallpapers/* ~/Pictures/wallpapers/; then 2>&1 | tee -a "$LOG" + rm -rf Wallpaper-Bank 2>&1 | tee -a "$LOG" # Remove cloned repository after copying wallpapers + break + else + echo "${ERROR} Copying wallpapers failed" 2>&1 | tee -a "$LOG" + fi + else + echo "${ERROR} Downloading additional wallpapers failed" 2>&1 | tee -a "$LOG" + fi + ;; + [Nn]) + echo "You chose not to download additional wallpapers." 2>&1 | tee -a "$LOG" + break + ;; + *) + echo "Please enter 'y' or 'n' to proceed." + ;; + esac +done + +printf "\n%.0s" {1..3} # Detect machine type and set Waybar configurations accordingly, logging the output if hostnamectl | grep -q 'Chassis: desktop'; then |
