diff options
| author | Ja.KooLit <85185940+JaKooLit@users.noreply.github.com> | 2025-01-01 22:06:10 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-01 22:06:10 +0900 |
| commit | da004f3ec86f6b7bd243fe9d170df4920a0c0a73 (patch) | |
| tree | 0254d4166aff2911b5ea073d6ae683dcb7c98287 | |
| parent | 478e20e2197c6a6f4c1d7a04a3dbba89eaea7552 (diff) | |
| parent | d356475d8acf276a75985336c83c33f7e2ec8db7 (diff) | |
Merge pull request #513 from JaKooLit/development
Development to Main
| -rw-r--r-- | config/waybar/configs/[BOT] Sleek | 3 | ||||
| -rw-r--r-- | config/waybar/configs/[TOP] Sleek | 3 | ||||
| -rwxr-xr-x | copy.sh | 60 |
3 files changed, 56 insertions, 10 deletions
diff --git a/config/waybar/configs/[BOT] Sleek b/config/waybar/configs/[BOT] Sleek index a4aed328..6bce5dd2 100644 --- a/config/waybar/configs/[BOT] Sleek +++ b/config/waybar/configs/[BOT] Sleek @@ -35,8 +35,7 @@ "modules-right": [ "hyprland/window", - "custom/separator#blank", - "custom/separator#blank", + "custom/separator#blank_2", "pulseaudio", "custom/separator#blank", "custom/power", diff --git a/config/waybar/configs/[TOP] Sleek b/config/waybar/configs/[TOP] Sleek index 5edc1646..0dc9057e 100644 --- a/config/waybar/configs/[TOP] Sleek +++ b/config/waybar/configs/[TOP] Sleek @@ -34,8 +34,7 @@ "modules-right": [ "hyprland/window", - "custom/separator#blank", - "custom/separator#blank", + "custom/separator#blank_2", "pulseaudio", "custom/separator#blank", "custom/power", @@ -499,9 +499,14 @@ for DIR_NAME in $DIR; do fi done -printf "\n" +printf "\n%.0s" {1..2} + +# Restoring UserConfigs and UserScripts +echo -e "Restoring previous User-Configs... " +echo -e "${NOTE}: If you decide to restore the old configs, make sure to handle the updates or changes manually." +echo -e "Visit and check KooL's Hyprland-Dots GitHub page for the commits.\n" -# restoration of old configs +# UserConfigs DIRH="hypr" FILES_TO_RESTORE=( "ENVariables.conf" @@ -519,18 +524,25 @@ FILES_TO_RESTORE=( DIRPATH=~/.config/"$DIRH" BACKUP_DIR=$(get_backup_dirname) +if [ -z "$BACKUP_DIR" ]; then + echo "${ERROR} - Backup directory name is empty. Exiting." + exit 1 +fi # Check if the UserConfigs directory exists in ~/.config/hypr if [ -d "$DIRPATH/UserConfigs" ]; then - # Loop through files to check and offer restoration for FILE_NAME in "${FILES_TO_RESTORE[@]}"; do BACKUP_FILE="$DIRPATH-backup-$BACKUP_DIR/UserConfigs/$FILE_NAME" - + if [ -f "$BACKUP_FILE" ]; then printf "\n${INFO} Found ${YELLOW}$FILE_NAME${RESET} in hypr backup...\n" read -p "${CAT} Do you want to restore ${ORANGE}$FILE_NAME${RESET} from backup? (y/N): " file_restore if [[ "$file_restore" == [Yy]* ]]; then - cp "$BACKUP_FILE" "$DIRPATH/UserConfigs/$FILE_NAME" && echo "${OK} - $FILE_NAME restored!" 2>&1 | tee -a "$LOG" + if cp "$BACKUP_FILE" "$DIRPATH/UserConfigs/$FILE_NAME"; then + echo "${OK} - $FILE_NAME restored!" 2>&1 | tee -a "$LOG" + else + echo "${ERROR} - Failed to restore $FILE_NAME!" 2>&1 | tee -a "$LOG" + fi else echo "${NOTE} - Skipped restoring $FILE_NAME." fi @@ -542,7 +554,43 @@ fi printf "\n%.0s" {1..2} -# copying Wallpapers +# UserScripts +echo -e "Restoring previous some User-Scripts...\n" + +DIRSH="hypr" +SCRIPTS_TO_RESTORE=( + "RofiBeats.sh" + "Weather.py" + "Weather.sh" +) + +DIRSHPATH=~/.config/"$DIRSH" + +if [ -d "$DIRSHPATH/UserScripts" ]; then + for SCRIPT_NAME in "${SCRIPTS_TO_RESTORE[@]}"; do + BACKUP_SCRIPT="$DIRSHPATH-backup-$BACKUP_DIR/UserScripts/$SCRIPT_NAME" + + if [ -f "$BACKUP_SCRIPT" ]; then + printf "\n${INFO} Found ${YELLOW}$SCRIPT_NAME${RESET} in hypr backup...\n" + read -p "${CAT} Do you want to restore ${ORANGE}$SCRIPT_NAME${RESET} from backup? (y/N): " script_restore + if [[ "$script_restore" == [Yy]* ]]; then + if cp "$BACKUP_SCRIPT" "$DIRPATH/UserScripts/$SCRIPT_NAME"; then + echo "${OK} - $SCRIPT_NAME restored!" 2>&1 | tee -a "$LOG" + else + echo "${ERROR} - Failed to restore $SCRIPT_NAME!" 2>&1 | tee -a "$LOG" + fi + else + echo "${NOTE} - Skipped restoring $SCRIPT_NAME." + fi + fi + done +else + echo "${ERROR} - UserScripts directory does not exist in $DIRPATH. Skipping restoration." +fi + +printf "\n%.0s" {1..2} + +# Wallpapers mkdir -p ~/Pictures/wallpapers cp -r wallpapers ~/Pictures/ && { echo "${OK} some wallpapers compied!"; } || { echo "${ERROR} Failed to copy some wallpapers."; exit 1; } 2>&1 | tee -a "$LOG" |
