diff options
| author | JaKooLit <ejhay.games@gmail.com> | 2025-01-31 23:36:37 +0900 |
|---|---|---|
| committer | JaKooLit <ejhay.games@gmail.com> | 2025-01-31 23:37:00 +0900 |
| commit | 7b5c96dc5ed91eef106918f0ec99701ad8574948 (patch) | |
| tree | 64eadaf8c0fe3da9cb387b911d6cdd6698d15dcd /copy.sh | |
| parent | 370e364607fd585c9a0cd85f77cffdf9ce4debc7 (diff) | |
updated some color coding.
Will probably tweak more later
Diffstat (limited to 'copy.sh')
| -rwxr-xr-x | copy.sh | 53 |
1 files changed, 27 insertions, 26 deletions
@@ -26,7 +26,8 @@ NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)" INFO="$(tput setaf 4)[INFO]$(tput sgr0)" WARN="$(tput setaf 1)[WARN]$(tput sgr0)" CAT="$(tput setaf 6)[ACTION]$(tput sgr0)" -ORANGE=$(tput setaf 5) +MAGENTA=$(tput setaf 5) +WARNING=$(tput setaf 1) YELLOW=$(tput setaf 3) BLUE=$(tput setaf 4) RESET=$(tput sgr0) @@ -113,7 +114,7 @@ layout=$(detect_layout) if [ "$layout" = "(unset)" ]; then while true; do printf "\n%.0s" {1..1} - print_color $ORANGE " + print_color $WARNING " █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ STOP AND READ █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ @@ -149,7 +150,7 @@ printf "${NOTE} Detecting keyboard layout to prepare proper Hyprland Settings\n\ # Prompt the user to confirm whether the detected layout is correct while true; do - printf "${INFO} Current keyboard layout is ${ORANGE}$layout${RESET}\n" + printf "${INFO} Current keyboard layout is ${MAGENTA}$layout${RESET}\n" read -p "${CAT} Is this correct? [y/n] " keyboard_layout case $keyboard_layout in @@ -158,11 +159,11 @@ while true; do awk -v layout="$layout" '/kb_layout/ {$0 = " kb_layout = " layout} 1' config/hypr/UserConfigs/UserSettings.conf > temp.conf mv temp.conf config/hypr/UserConfigs/UserSettings.conf - echo "${NOTE} kb_layout ${ORANGE}$layout${RESET} configured in settings." 2>&1 | tee -a "$LOG" + echo "${NOTE} kb_layout ${MAGENTA}$layout${RESET} configured in settings." 2>&1 | tee -a "$LOG" break ;; [nN]) printf "\n%.0s" {1..2} - print_color $ORANGE " + print_color $WARNING " █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ STOP AND READ █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ @@ -220,14 +221,14 @@ printf "\n" update_editor() { local editor=$1 sed -i "s/#env = EDITOR,.*/env = EDITOR,$editor #default editor/" config/hypr/UserConfigs/ENVariables.conf - echo "${OK} Default editor set to ${ORANGE}$editor${RESET}." 2>&1 | tee -a "$LOG" + echo "${OK} Default editor set to ${MAGENTA}$editor${RESET}." 2>&1 | tee -a "$LOG" } EDITOR_SET=0 # Check for neovim if installed if command -v nvim &> /dev/null; then - printf "${INFO} ${ORANGE}neovim${RESET} is detected as installed\n" - read -p "${CAT} Do you want to make ${ORANGE}neovim${RESET} the default editor? (y/N): " EDITOR_CHOICE + printf "${INFO} ${MAGENTA}neovim${RESET} is detected as installed\n" + read -p "${CAT} Do you want to make ${MAGENTA}neovim${RESET} the default editor? (y/N): " EDITOR_CHOICE if [[ "$EDITOR_CHOICE" == "y" ]]; then update_editor "nvim" EDITOR_SET=1 @@ -238,8 +239,8 @@ printf "\n" # Check for vim if installed, but only if neovim wasn't chosen if [[ "$EDITOR_SET" -eq 0 ]] && command -v vim &> /dev/null; then - printf "${INFO} ${ORANGE}vim${RESET} is detected as installed\n" - read -p "${CAT} Do you want to make ${ORANGE}vim${RESET} the default editor? (y/N): " EDITOR_CHOICE + printf "${INFO} ${MAGENTA}vim${RESET} is detected as installed\n" + read -p "${CAT} Do you want to make ${MAGENTA}vim${RESET} the default editor? (y/N): " EDITOR_CHOICE if [[ "$EDITOR_CHOICE" == "y" ]]; then update_editor "vim" EDITOR_SET=1 @@ -247,14 +248,14 @@ if [[ "$EDITOR_SET" -eq 0 ]] && command -v vim &> /dev/null; then fi if [[ "$EDITOR_SET" -eq 0 ]]; then - echo "${ORANGE} Neither neovim nor vim is installed or selected as default." + echo "${YELLOW} Neither neovim nor vim is installed or selected as default." 2>&1 | tee -a "$LOG" fi printf "\n" # Action to do for better rofi and kitty appearance while true; do - echo "$ORANGE Select monitor resolution to properly configure appearance and fonts:" + echo "$MAGENTA Select monitor resolution to properly configure appearance and fonts:" echo "$YELLOW -- Enter 1. for monitor res 1440p or less (< 1440p)" echo "$YELLOW -- Enter 2. for monitors res higher than 1440p (≥ 1440p)" read -p "$CAT Enter the number of your choice (1 or 2): " res_choice @@ -294,7 +295,7 @@ printf "\n" # Ask whether to change to 12hr format while true; do - echo -e "$ORANGE By default, configs are in 24H format." + echo -e "$MAGENTA By default, configs are in 24H format." read -p "$CAT Do you want to change to 12H format (AM/PM)? (y/n): " answer # Convert the answer to lowercase for comparison @@ -366,7 +367,7 @@ done printf "\n" # Check if the user wants to disable Rainbow borders -printf "${ORANGE} By default, Rainbow Borders animation is enabled.\n" +printf "${MAGENTA} By default, Rainbow Borders animation is enabled.\n" printf "${WARN} - However, this uses a bit more CPU and Memory resources.\n" read -p "${CAT} Do you want to disable Rainbow Borders animation? (y/N): " border_choice @@ -412,7 +413,7 @@ for DIR2 in $DIRS; do if [ -d "$DIRPATH" ]; then while true; do - read -p "${CAT} ${ORANGE}$DIR2${RESET} config found in ~/.config/ Do you want to replace ${ORANGE}$DIR2${RESET} config? (y/n): " DIR1_CHOICE + read -p "${CAT} ${MAGENTA}$DIR2${RESET} config found in ~/.config/ Do you want to replace ${MAGENTA}$DIR2${RESET} config? (y/n): " DIR1_CHOICE case "$DIR1_CHOICE" in [Yy]* ) BACKUP_DIR=$(get_backup_dirname) @@ -437,7 +438,7 @@ for DIR2 in $DIRS; do ;; [Nn]* ) # Skip the directory - echo -e "${NOTE} - Skipping ${ORANGE}$DIR2${RESET} " 2>&1 | tee -a "$LOG" + echo -e "${NOTE} - Skipping ${MAGENTA}$DIR2${RESET} " 2>&1 | tee -a "$LOG" break ;; * ) @@ -484,7 +485,7 @@ for DIR_NAME in $DIR; do # Backup the existing directory if it exists if [ -d "$DIRPATH" ]; then - echo -e "${NOTE} - Config for ${ORANGE}$DIR_NAME${RESET} found, attempting to back up." + echo -e "${NOTE} - Config for ${MAGENTA}$DIR_NAME${RESET} found, attempting to back up." BACKUP_DIR=$(get_backup_dirname) # Backup the existing directory @@ -539,7 +540,7 @@ if [ -z "$BACKUP_DIR" ]; then fi if [ -d "$BACKUP_DIR_PATH" ]; then - echo -e "${NOTE} Restoring previous ${ORANGE}User-Configs${RESET}... " + echo -e "${NOTE} Restoring previous ${MAGENTA}User-Configs${RESET}... " echo -e "${WARN} If you decide to restore the old configs, make sure to handle the updates or changes manually." echo -e "${INFO} Kindly Visit and check KooL's Hyprland-Dots GitHub page for the commits." @@ -547,7 +548,7 @@ if [ -d "$BACKUP_DIR_PATH" ]; then BACKUP_FILE="$BACKUP_DIR_PATH/$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 + read -p "${CAT} Do you want to restore ${MAGENTA}$FILE_NAME${RESET} from backup? (y/N): " file_restore if [[ "$file_restore" == [Yy]* ]]; then if cp "$BACKUP_FILE" "$DIRPATH/UserConfigs/$FILE_NAME"; then @@ -576,14 +577,14 @@ DIRSHPATH=~/.config/"$DIRSH" BACKUP_DIR_PATH="$DIRSHPATH-backup-$BACKUP_DIR/UserScripts" if [ -d "$BACKUP_DIR_PATH" ]; then - echo -e "${NOTE} Restoring previous ${ORANGE}User-Scripts${RESET}..." + echo -e "${NOTE} Restoring previous ${MAGENTA}User-Scripts${RESET}..." for SCRIPT_NAME in "${SCRIPTS_TO_RESTORE[@]}"; do BACKUP_SCRIPT="$BACKUP_DIR_PATH/$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 + read -p "${CAT} Do you want to restore ${MAGENTA}$SCRIPT_NAME${RESET} from backup? (y/N): " script_restore if [[ "$script_restore" == [Yy]* ]]; then if cp "$BACKUP_SCRIPT" "$DIRSHPATH/UserScripts/$SCRIPT_NAME"; then echo "${OK} - $SCRIPT_NAME restored!" 2>&1 | tee -a "$LOG" @@ -690,9 +691,9 @@ cleanup_backups() { # If more than one backup found if [ ${#BACKUP_DIRS[@]} -gt 1 ]; then - printf "\n\n ${INFO} Performing clean up for ${ORANGE}${DIR##*/}${RESET}\n" + printf "\n\n ${INFO} Performing clean up for ${MAGENTA}${DIR##*/}${RESET}\n" - echo -e "${NOTE} Found multiple backups for: ${ORANGE}${DIR##*/}${RESET}" + echo -e "${NOTE} Found multiple backups for: ${MAGENTA}${DIR##*/}${RESET}" echo "${YELLOW}Backups: ${RESET}" # List the backups @@ -700,7 +701,7 @@ cleanup_backups() { echo " - ${BACKUP##*/}" done - read -p "${CAT} Do you want to delete the older backups of ${ORANGE}${DIR##*/}${RESET} and keep the latest backup only? (y/N): " back_choice + read -p "${CAT} Do you want to delete the older backups of ${MAGENTA}${DIR##*/}${RESET} and keep the latest backup only? (y/N): " back_choice if [[ "$back_choice" == [Yy]* ]]; then # Sort backups by modification time latest_backup="${BACKUP_DIRS[0]}" @@ -716,7 +717,7 @@ cleanup_backups() { rm -rf "$BACKUP" fi done - echo "Old backups of ${ORANGE}${DIR##*/}${RESET} deleted, keeping: ${YELLOW}${latest_backup##*/}${RESET}" + echo "Old backups of ${MAGENTA}${DIR##*/}${RESET} deleted, keeping: ${YELLOW}${latest_backup##*/}${RESET}" fi fi fi @@ -736,4 +737,4 @@ wallust run -s $wallpaper 2>&1 | tee -a "$LOG" printf "\n%.0s" {1..4} printf "${OK} GREAT! KooL's Hyprland-Dots is now Loaded & Ready !!!" printf "\n%.0s" {1..1} -printf "${ORANGE} HOWEVER I HIGHLY SUGGEST to logout and re-login or better reboot to avoid any issues\n\n" +printf "${MAGENTA} HOWEVER I HIGHLY SUGGEST to logout and re-login or better reboot to avoid any issues\n\n" |
