diff --git a/scripts/fluidd.sh b/scripts/fluidd.sh index 5096bb8..fb6e27c 100644 --- a/scripts/fluidd.sh +++ b/scripts/fluidd.sh @@ -168,11 +168,11 @@ function fluidd_status(){ fi done if [ "$fcount" == "${#fluidd_data[*]}" ]; then - FLUIDD_STATUS="${green}Installed!${default} " + FLUIDD_STATUS="${green}Installed!${white} " elif [ "$fcount" == 0 ]; then - FLUIDD_STATUS="${red}Not installed!${default} " + FLUIDD_STATUS="${red}Not installed!${white} " else - FLUIDD_STATUS="${yellow}Incomplete!${default} " + FLUIDD_STATUS="${yellow}Incomplete!${white} " fi } diff --git a/scripts/klipperscreen.sh b/scripts/klipperscreen.sh index b55c64b..8e9bcad 100644 --- a/scripts/klipperscreen.sh +++ b/scripts/klipperscreen.sh @@ -153,11 +153,11 @@ function klipperscreen_status(){ fi done if [ "${klsccount}" == "${#klipperscreen_data[*]}" ]; then - KLIPPERSCREEN_STATUS="${green}Installed!${default} " + KLIPPERSCREEN_STATUS="${green}Installed!${white} " elif [ "${klsccount}" == 0 ]; then - KLIPPERSCREEN_STATUS="${red}Not installed!${default} " + KLIPPERSCREEN_STATUS="${red}Not installed!${white} " else - KLIPPERSCREEN_STATUS="${yellow}Incomplete!${default} " + KLIPPERSCREEN_STATUS="${yellow}Incomplete!${white} " fi } @@ -177,13 +177,13 @@ function compare_klipperscreen_versions(){ unset KLIPPERSCREEN_UPDATE_AVAIL read_klipperscreen_versions if [ "${LOCAL_KLIPPERSCREEN_COMMIT}" != "${REMOTE_KLIPPERSCREEN_COMMIT}" ]; then - LOCAL_KLIPPERSCREEN_COMMIT="${yellow}$(printf "%-12s" "${LOCAL_KLIPPERSCREEN_COMMIT}")${default}" - REMOTE_KLIPPERSCREEN_COMMIT="${green}$(printf "%-12s" "${REMOTE_KLIPPERSCREEN_COMMIT}")${default}" + LOCAL_KLIPPERSCREEN_COMMIT="${yellow}$(printf "%-12s" "${LOCAL_KLIPPERSCREEN_COMMIT}")${white}" + REMOTE_KLIPPERSCREEN_COMMIT="${green}$(printf "%-12s" "${REMOTE_KLIPPERSCREEN_COMMIT}")${white}" KLIPPERSCREEN_UPDATE_AVAIL="true" update_arr+=(update_klipperscreen) else - LOCAL_KLIPPERSCREEN_COMMIT="${green}$(printf "%-12s" "${LOCAL_KLIPPERSCREEN_COMMIT}")${default}" - REMOTE_KLIPPERSCREEN_COMMIT="${green}$(printf "%-12s" "${REMOTE_KLIPPERSCREEN_COMMIT}")${default}" + LOCAL_KLIPPERSCREEN_COMMIT="${green}$(printf "%-12s" "${LOCAL_KLIPPERSCREEN_COMMIT}")${white}" + REMOTE_KLIPPERSCREEN_COMMIT="${green}$(printf "%-12s" "${REMOTE_KLIPPERSCREEN_COMMIT}")${white}" KLIPPERSCREEN_UPDATE_AVAIL="false" fi } diff --git a/scripts/mjpg-streamer.sh b/scripts/mjpg-streamer.sh index 27a1ecd..4081b6f 100644 --- a/scripts/mjpg-streamer.sh +++ b/scripts/mjpg-streamer.sh @@ -155,7 +155,7 @@ function get_user_selection_mjpg-streamer(){ top_border echo -e "| Install MJGP-Streamer for webcam support? |" bottom_border - read -p "${cyan}###### Install MJPG-Streamer? (Y/n):${default} " yn + read -p "${cyan}###### Install MJPG-Streamer? (Y/n):${white} " yn case "${yn}" in Y|y|Yes|yes|"") echo -e "###### > Yes" diff --git a/scripts/moonraker-telegram-bot.sh b/scripts/moonraker-telegram-bot.sh index 7888aed..1001f67 100644 --- a/scripts/moonraker-telegram-bot.sh +++ b/scripts/moonraker-telegram-bot.sh @@ -129,11 +129,11 @@ function MoonrakerTelegramBot_status(){ fi done if [ "${mtbcount}" == "${#MoonrakerTelegramBot_data[*]}" ]; then - MOONRAKER_TELEGRAM_BOT_STATUS="${green}Installed!${default} " + MOONRAKER_TELEGRAM_BOT_STATUS="${green}Installed!${white} " elif [ "${mtbcount}" == 0 ]; then - MOONRAKER_TELEGRAM_BOT_STATUS="${red}Not installed!${default} " + MOONRAKER_TELEGRAM_BOT_STATUS="${red}Not installed!${white} " else - MOONRAKER_TELEGRAM_BOT_STATUS="${yellow}Incomplete!${default} " + MOONRAKER_TELEGRAM_BOT_STATUS="${yellow}Incomplete!${white} " fi } @@ -153,13 +153,13 @@ function compare_MoonrakerTelegramBot_versions(){ unset MOONRAKER_TELEGRAM_BOT_UPDATE_AVAIL read_MoonrakerTelegramBot_versions if [ "${LOCAL_MOONRAKER_TELEGRAM_BOT_COMMIT}" != "${REMOTE_MOONRAKER_TELEGRAM_BOT_COMMIT}" ]; then - LOCAL_MOONRAKER_TELEGRAM_BOT_COMMIT="${yellow}$(printf "%-12s" "${LOCAL_MOONRAKER_TELEGRAM_BOT_COMMIT}")${default}" - REMOTE_MOONRAKER_TELEGRAM_BOT_COMMIT="${green}$(printf "%-12s" "${REMOTE_MOONRAKER_TELEGRAM_BOT_COMMIT}")${default}" + LOCAL_MOONRAKER_TELEGRAM_BOT_COMMIT="${yellow}$(printf "%-12s" "${LOCAL_MOONRAKER_TELEGRAM_BOT_COMMIT}")${white}" + REMOTE_MOONRAKER_TELEGRAM_BOT_COMMIT="${green}$(printf "%-12s" "${REMOTE_MOONRAKER_TELEGRAM_BOT_COMMIT}")${white}" # add moonraker telegram bot to the update all array for the update all function in the updater MOONRAKER_TELEGRAM_BOT_UPDATE_AVAIL="true" && update_arr+=(update_MoonrakerTelegramBot) else - LOCAL_MOONRAKER_TELEGRAM_BOT_COMMIT="${green}$(printf "%-12s" "${LOCAL_MOONRAKER_TELEGRAM_BOT_COMMIT}")${default}" - REMOTE_MOONRAKER_TELEGRAM_BOT_COMMIT="${green}$(printf "%-12s" "${REMOTE_MOONRAKER_TELEGRAM_BOT_COMMIT}")${default}" + LOCAL_MOONRAKER_TELEGRAM_BOT_COMMIT="${green}$(printf "%-12s" "${LOCAL_MOONRAKER_TELEGRAM_BOT_COMMIT}")${white}" + REMOTE_MOONRAKER_TELEGRAM_BOT_COMMIT="${green}$(printf "%-12s" "${REMOTE_MOONRAKER_TELEGRAM_BOT_COMMIT}")${white}" MOONRAKER_TELEGRAM_BOT_UPDATE_AVAIL="false" fi } diff --git a/scripts/moonraker.sh b/scripts/moonraker.sh index 544ceb7..7aa9ebb 100644 --- a/scripts/moonraker.sh +++ b/scripts/moonraker.sh @@ -63,9 +63,9 @@ function moonraker_setup_dialog(){ top_border if [ -f "${INITD}/klipper" ] || [ -f "${SYSTEMD}/klipper.service" ]; then - printf "|${green}%-55s${default}|\n" " 1 Klipper instance was found!" + printf "|${green}%-55s${white}|\n" " 1 Klipper instance was found!" elif [ "$(klipper_systemd | wc -w)" -gt 1 ]; then - printf "|${green}%-55s${default}|\n" " $(klipper_systemd | wc -w) Klipper instances were found!" + printf "|${green}%-55s${white}|\n" " $(klipper_systemd | wc -w) Klipper instances were found!" else echo -e "| ${yellow}INFO: No existing Klipper installation found!${default} |" fi diff --git a/scripts/network_functions.sh b/scripts/network_functions.sh index 73f312e..784bd3b 100755 --- a/scripts/network_functions.sh +++ b/scripts/network_functions.sh @@ -80,7 +80,7 @@ function create_custom_hostname(){ echo -e "| browsing to: http://my-printer.local |" bottom_border while true; do - read -p "${cyan}###### Do you want to change the hostname? (y/N):${default} " yn + read -p "${cyan}###### Do you want to change the hostname? (y/N):${white} " yn case "$yn" in Y|y|Yes|yes) user_input_hostname @@ -99,18 +99,18 @@ function user_input_hostname(){ unset HOSTENAME_CONFIRM echo top_border - echo -e "| ${green}Allowed characters: a-z, 0-9 and single '-'${default} |" - echo -e "| ${red}No special characters allowed!${default} |" - echo -e "| ${red}No leading or trailing '-' allowed!${default} |" + echo -e "| ${green}Allowed characters: a-z, 0-9 and single '-'${white} |" + echo -e "| ${red}No special characters allowed!${white} |" + echo -e "| ${red}No leading or trailing '-' allowed!${white} |" bottom_border while true; do - read -p "${cyan}###### Please set the new hostname:${default} " NEW_HOSTNAME + read -p "${cyan}###### Please set the new hostname:${white} " NEW_HOSTNAME if [[ $NEW_HOSTNAME =~ ^[^\-\_]+([0-9a-z]\-{0,1})+[^\-\_]+$ ]]; then ok_msg "'$NEW_HOSTNAME' is a valid hostname!" HOSTNAME_VALID="true" while true; do echo - read -p "${cyan}###### Do you want '$NEW_HOSTNAME' to be the new hostname? (Y/n):${default} " yn + read -p "${cyan}###### Do you want '$NEW_HOSTNAME' to be the new hostname? (Y/n):${white} " yn case "$yn" in Y|y|Yes|yes|"") echo -e "###### > Yes" @@ -118,7 +118,7 @@ function user_input_hostname(){ break;; N|n|No|no) echo -e "###### > No" - echo -e "${red}Skip hostname change ...${default}" + echo -e "${red}Skip hostname change ...${white}" HOSTENAME_CONFIRM="false" break;; *) diff --git a/scripts/nginx.sh b/scripts/nginx.sh index 587c251..a66a473 100644 --- a/scripts/nginx.sh +++ b/scripts/nginx.sh @@ -196,7 +196,7 @@ function process_services_dialog(){ while true; do echo top_border - echo -e "| ${red}Possibly disruptive/incompatible services found!${default} |" + echo -e "| ${red}Possibly disruptive/incompatible services found!${white} |" hr if [ "${HAPROXY_FOUND}" = "true" ]; then echo -e "| ● haproxy |" @@ -213,9 +213,9 @@ function process_services_dialog(){ echo -e "| |" echo -e "| 1) Remove packages (recommend) |" echo -e "| 2) Disable only (may cause issues) |" - echo -e "| ${red}3) Skip this step (not recommended)${default} |" + echo -e "| ${red}3) Skip this step (not recommended)${white} |" bottom_border - read -p "${cyan}###### Please choose:${default} " action + read -p "${cyan}###### Please choose:${white} " action case "${action}" in 1) echo -e "###### > Remove packages" diff --git a/scripts/octoprint.sh b/scripts/octoprint.sh index 7807c29..1b262ac 100644 --- a/scripts/octoprint.sh +++ b/scripts/octoprint.sh @@ -41,7 +41,7 @@ octoprint_setup_dialog(){ echo -e "| You need one OctoPrint instance per Klipper instance. | " bottom_border echo - read -p "${cyan}###### Create $INSTANCE_COUNT OctoPrint instances? (Y/n):${default} " yn + read -p "${cyan}###### Create $INSTANCE_COUNT OctoPrint instances? (Y/n):${white} " yn case "$yn" in Y|y|Yes|yes|"") echo -e "###### > Yes" diff --git a/scripts/rollback.sh b/scripts/rollback.sh index a1f74e5..aaa6d9d 100755 --- a/scripts/rollback.sh +++ b/scripts/rollback.sh @@ -35,15 +35,15 @@ load_klipper_state(){ PREVIOUS_COMMIT_DATE=$(git show -s --format=%cd --date=short $PREVIOUS_COMMIT) fi if [ "$PREVIOUS_COMMIT" = "0" ]; then - CURR_UI=$(echo -e "${green}$CURRENT_COMMIT from $CURRENT_COMMIT_DATE${default}") - PREV_UI=$(echo -e "${red}None${default} ") + CURR_UI=$(echo -e "${green}$CURRENT_COMMIT from $CURRENT_COMMIT_DATE${white}") + PREV_UI=$(echo -e "${red}None${white} ") else if [ "$CURRENT_COMMIT" = "$PREVIOUS_COMMIT" ]; then - CURR_UI=$(echo -e "${green}$CURRENT_COMMIT from $CURRENT_COMMIT_DATE${default}") - PREV_UI=$(echo -e "${green}$PREVIOUS_COMMIT from $PREVIOUS_COMMIT_DATE${default}") + CURR_UI=$(echo -e "${green}$CURRENT_COMMIT from $CURRENT_COMMIT_DATE${white}") + PREV_UI=$(echo -e "${green}$PREVIOUS_COMMIT from $PREVIOUS_COMMIT_DATE${white}") else - CURR_UI=$(echo -e "${yellow}$CURRENT_COMMIT from $CURRENT_COMMIT_DATE${default}") - PREV_UI=$(echo -e "${yellow}$PREVIOUS_COMMIT from $PREVIOUS_COMMIT_DATE${default}") + CURR_UI=$(echo -e "${yellow}$CURRENT_COMMIT from $CURRENT_COMMIT_DATE${white}") + PREV_UI=$(echo -e "${yellow}$PREVIOUS_COMMIT from $PREVIOUS_COMMIT_DATE${white}") fi fi rollback_ui @@ -59,7 +59,7 @@ rollback_ui(){ echo -e "| used commit from which you have updated. | " bottom_border top_border - echo -e "| Active branch: ${green}$PRINT_BRANCH${default} | " + echo -e "| Active branch: ${green}$PRINT_BRANCH${white} | " hr echo -e "| Currently on commit: | " echo -e "| $CURR_UI | " @@ -74,7 +74,7 @@ rollback_klipper(){ while true; do echo -e "${cyan}" read -p "###### Do you want to rollback to $PREVIOUS_COMMIT? (Y/n): " yn - echo -e "${default}" + echo -e "${white}" case "$yn" in Y|y|Yes|yes|"") clear @@ -95,7 +95,7 @@ rollback_klipper(){ while true; do echo -e "${cyan}" read -p "Perform action: " action; echo - echo -e "${default}" + echo -e "${white}" case "$action" in B|b) clear; advanced_menu; break;; diff --git a/scripts/status.sh b/scripts/status.sh index c29c844..8b453fc 100755 --- a/scripts/status.sh +++ b/scripts/status.sh @@ -3,10 +3,10 @@ check_system_updates(){ if [ ! -z "$SYS_UPDATE" ]; then # add system updates to the update all array for the update all function in the updater SYS_UPDATE_AVAIL="true" && update_arr+=(update_system) - DISPLAY_SYS_UPDATE="${yellow}System upgrade available!${default}" + DISPLAY_SYS_UPDATE="${yellow}System upgrade available!${white}" else SYS_UPDATE_AVAIL="false" - DISPLAY_SYS_UPDATE="${green}System up to date! ${default}" + DISPLAY_SYS_UPDATE="${green}System up to date! ${white}" fi } diff --git a/scripts/ui/advanced_menu.sh b/scripts/ui/advanced_menu.sh index 2e9c5ae..a2f5bfb 100755 --- a/scripts/ui/advanced_menu.sh +++ b/scripts/ui/advanced_menu.sh @@ -91,7 +91,7 @@ switch_ui(){ echo -e "| $(title_msg "~~~~~~~~~ [ Switch Klipper Branch ] ~~~~~~~~~") |" bottom_border echo - echo -e " $(title_msg "Active Branch: ")${green}$GET_BRANCH${default}" + echo -e " $(title_msg "Active Branch: ")${green}$GET_BRANCH${white}" echo top_border echo -e "| | " @@ -109,7 +109,7 @@ switch_menu(){ read_branch do_action "" "switch_ui" while true; do - read -p "${cyan}Perform action:${default} " action; echo + read -p "${cyan}Perform action:${white} " action; echo case "$action" in 1) clear diff --git a/scripts/ui/backup_menu.sh b/scripts/ui/backup_menu.sh index 6495333..1b6ee52 100755 --- a/scripts/ui/backup_menu.sh +++ b/scripts/ui/backup_menu.sh @@ -15,7 +15,7 @@ backup_ui(){ top_border echo -e "| $(title_msg "~~~~~~~~~~~~~~ [ Backup Menu ] ~~~~~~~~~~~~~~") | " hr - echo -e "| ${yellow}Backup location: ~/kiauh-backups${default} | " + echo -e "| ${yellow}Backup location: ~/kiauh-backups${white} | " hr echo -e "| Configuration folder: | Klipper Webinterface: | " echo -e "| 0) [Klipper configs] | 4) [Mainsail] | " @@ -33,7 +33,7 @@ backup_ui(){ backup_menu(){ do_action "" "backup_ui" while true; do - read -p "${cyan}Perform action:${default} " action; echo + read -p "${cyan}Perform action:${white} " action; echo case "$action" in 0) do_action "backup_klipper_config_dir" "backup_ui";; diff --git a/scripts/ui/general_ui.sh b/scripts/ui/general_ui.sh index e046bb7..82ec0cf 100755 --- a/scripts/ui/general_ui.sh +++ b/scripts/ui/general_ui.sh @@ -30,19 +30,19 @@ hr(){ quit_footer(){ hr - echo -e "| ${red}Q) Quit${default} |" + echo -e "| ${red}Q) Quit${white} |" bottom_border } back_footer(){ hr - echo -e "| ${green}B) « Back${default} |" + echo -e "| ${green}B) « Back${white} |" bottom_border } back_help_footer(){ hr - echo -e "| ${green}B) « Back${default} | ${yellow}H) Help [?]${default} |" + echo -e "| ${green}B) « Back${white} | ${yellow}H) Help [?]${white} |" bottom_border } diff --git a/scripts/ui/install_menu.sh b/scripts/ui/install_menu.sh index a7d27c7..12703e7 100755 --- a/scripts/ui/install_menu.sh +++ b/scripts/ui/install_menu.sh @@ -35,7 +35,7 @@ install_ui(){ install_menu(){ do_action "" "install_ui" while true; do - read -p "${cyan}Perform action:${default} " action; echo + read -p "${cyan}Perform action:${white} " action; echo case "$action" in 1) do_action "klipper_setup_dialog" "install_ui";; diff --git a/scripts/ui/main_menu.sh b/scripts/ui/main_menu.sh index 819c78d..f1dd53e 100755 --- a/scripts/ui/main_menu.sh +++ b/scripts/ui/main_menu.sh @@ -70,7 +70,6 @@ main_menu(){ octoprint_status klipperscreen_status MoonrakerTelegramBot_status - print_msg && clear_msg main_ui while true; do read -p "${cyan}Perform action:${white} " action; echo diff --git a/scripts/ui/settings_menu.sh b/scripts/ui/settings_menu.sh index 7e9ddef..1a9cf86 100755 --- a/scripts/ui/settings_menu.sh +++ b/scripts/ui/settings_menu.sh @@ -16,20 +16,20 @@ settings_ui(){ top_border echo -e "| $(title_msg "~~~~~~~~~~~~ [ KIAUH Settings ] ~~~~~~~~~~~~~") | " hr - echo -e "| ${red}Caution:${default} | " + echo -e "| ${red}Caution:${white} | " echo -e "| When you change the config folder, be aware that ALL | " echo -e "| Klipper and Moonraker services will be STOPPED, | " echo -e "| reconfigured and then restarted again. | " blank_line - echo -e "| ${red}DO NOT change the folder during printing!${default} | " + echo -e "| ${red}DO NOT change the folder during printing!${white} | " hr blank_line - echo -e "| ${cyan}● Current Klipper config folder:${default} | " + echo -e "| ${cyan}● Current Klipper config folder:${white} | " printf "|%-55s|\n" " $klipper_cfg_loc" blank_line hr if [ -z $klipper_cfg_loc ]; then - echo -e "| ${red}N/A) Install Klipper with KIAUH first to unlock!${default} | " + echo -e "| ${red}N/A) Install Klipper with KIAUH first to unlock!${white} | " else echo -e "| 1) Change config folder | " fi @@ -39,7 +39,7 @@ settings_ui(){ settings_menu(){ do_action "" "settings_ui" while true; do - read -p "${cyan}Perform action:${default} " action; echo + read -p "${cyan}Perform action:${white} " action; echo case "$action" in 1) if [ ! -z $klipper_cfg_loc ]; then diff --git a/scripts/update.sh b/scripts/update.sh index d5d88ee..21111fd 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -8,32 +8,32 @@ update_all(){ top_border echo -e "| The following installations will be updated: |" if [ "$KLIPPER_UPDATE_AVAIL" = "true" ]; then - echo -e "| ${cyan}● Klipper${default} |" + echo -e "| ${cyan}● Klipper${white} |" fi if [ "$MOONRAKER_UPDATE_AVAIL" = "true" ]; then - echo -e "| ${cyan}● Moonraker${default} |" + echo -e "| ${cyan}● Moonraker${white} |" fi if [ "$MAINSAIL_UPDATE_AVAIL" = "true" ]; then - echo -e "| ${cyan}● Mainsail${default} |" + echo -e "| ${cyan}● Mainsail${white} |" fi if [ "$FLUIDD_UPDATE_AVAIL" = "true" ]; then - echo -e "| ${cyan}● Fluidd${default} |" + echo -e "| ${cyan}● Fluidd${white} |" fi if [ "$KLIPPERSCREEN_UPDATE_AVAIL" = "true" ]; then - echo -e "| ${cyan}● KlipperScreen${default} |" + echo -e "| ${cyan}● KlipperScreen${white} |" fi if [ "$PGC_UPDATE_AVAIL" = "true" ]; then - echo -e "| ${cyan}● PrettyGCode for Klipper${default} |" + echo -e "| ${cyan}● PrettyGCode for Klipper${white} |" fi if [ "$MOONRAKER_TELEGRAM_BOT_UPDATE_AVAIL" = "true" ]; then - echo -e "| ${cyan}● MoonrakerTelegramBot${default} |" + echo -e "| ${cyan}● MoonrakerTelegramBot${white} |" fi if [ "$SYS_UPDATE_AVAIL" = "true" ]; then - echo -e "| ${cyan}● System${default} |" + echo -e "| ${cyan}● System${white} |" fi bottom_border if [ "${#update_arr[@]}" != "0" ]; then - read -p "${cyan}###### Do you want to proceed? (Y/n):${default} " yn + read -p "${cyan}###### Do you want to proceed? (Y/n):${white} " yn case "$yn" in Y|y|Yes|yes|"") for update in ${update_arr[@]} diff --git a/scripts/upload_log.sh b/scripts/upload_log.sh index eaa959b..5d27154 100755 --- a/scripts/upload_log.sh +++ b/scripts/upload_log.sh @@ -1,21 +1,21 @@ accept_upload_conditions(){ while true; do top_border - echo -e "| ${red}~~~~~~~~~~~ [ Upload Agreement ] ~~~~~~~~~~~~${default} |" + echo -e "| ${red}~~~~~~~~~~~ [ Upload Agreement ] ~~~~~~~~~~~~${white} |" hr echo -e "| The following function will help to quickly upload |" echo -e "| logs for debugging purposes. With confirming this |" echo -e "| dialog, you agree that during that process your logs |" - echo -e "| will be uploaded to: ${yellow}http://paste.c-net.org/${default} |" + echo -e "| will be uploaded to: ${yellow}http://paste.c-net.org/${white} |" hr - echo -e "| ${red}PLEASE NOTE:${default} |" + echo -e "| ${red}PLEASE NOTE:${white} |" echo -e "| Be aware that logs can contain network information, |" echo -e "| private data like usernames, filenames, or other |" echo -e "| information you may not want to make public. |" blank_line - echo -e "| Do ${red}NOT${default} use this function if you don't agree! |" + echo -e "| Do ${red}NOT${white} use this function if you don't agree! |" bottom_border - read -p "${cyan}Do you accept? (Y/n):${default} " yn + read -p "${cyan}Do you accept? (Y/n):${white} " yn case "$yn" in Y|y|Yes|yes|"") sed -i "/logupload_accepted=/s/false/true/" $INI_FILE @@ -59,7 +59,7 @@ upload_selection(){ ### draw interface i=0 top_border - echo -e "| ${yellow}~~~~~~~~~~~~~~~ [ Log Upload ] ~~~~~~~~~~~~~~${default} |" + echo -e "| ${yellow}~~~~~~~~~~~~~~~ [ Log Upload ] ~~~~~~~~~~~~~~${white} |" hr echo -e "| You can choose the following files for uploading: |" for log in ${logfiles[@]}; do @@ -68,7 +68,7 @@ upload_selection(){ done back_footer while true; do - read -p "${cyan}Please select:${default} " choice + read -p "${cyan}Please select:${white} " choice if [ $choice = "b" ] || [ $choice = "B" ]; then clear && main_menu && break elif [ $choice -le ${#logfiles[@]} ]; then @@ -88,7 +88,7 @@ upload_log(){ status_msg "Uploading $1 ..." LINK=$(curl -s --upload-file $1 'http://paste.c-net.org/') [ ! -z "$LINK" ] && ok_msg "$1 upload successfull!" - echo -e "\n${cyan}###### Here is your link:${default}" + echo -e "\n${cyan}###### Here is your link:${white}" echo -e ">>>>>> $LINK\n" unset LINK else diff --git a/scripts/utilities.sh b/scripts/utilities.sh index 88d985b..6fea6d5 100644 --- a/scripts/utilities.sh +++ b/scripts/utilities.sh @@ -119,19 +119,19 @@ function read_kiauh_ini(){ function init_ini(){ ### remove pre-version 4 ini files - if [ -f "${INI_FILE}" ] && ! grep -Eq "^KIAUH v4\.0\.0$" "${INI_FILE}"; then + if [ -f "${INI_FILE}" ] && ! grep -Eq "^# KIAUH v4\.0\.0$" "${INI_FILE}"; then rm "${INI_FILE}" fi ### initialize ini file if [ ! -f "${INI_FILE}" ]; then { - echo -e "File creation date: $(date)" + echo -e "# File creation date: $(date)" echo -e "#=================================================#" echo -e "# KIAUH - Klipper Installation And Update Helper #" echo -e "# https://github.com/th33xitus/kiauh #" echo -e "# DO NOT edit this file! #" echo -e "#=================================================#" - echo -e "KIAUH v4.0.0" + echo -e "# KIAUH v4.0.0" } >> "${INI_FILE}" fi if ! grep -Eq "^backup_before_update=." "${INI_FILE}"; then @@ -487,16 +487,16 @@ function get_user_selection_kiauh_macros(){ echo -e "| fully functional and working. |" blank_line echo -e "| Those macros are: |" - echo -e "| ${cyan}● [gcode_macro PAUSE]${default} |" - echo -e "| ${cyan}● [gcode_macro RESUME]${default} |" - echo -e "| ${cyan}● [gcode_macro CANCEL_PRINT]${default} |" + echo -e "| ${cyan}● [gcode_macro PAUSE]${white} |" + echo -e "| ${cyan}● [gcode_macro RESUME]${white} |" + echo -e "| ${cyan}● [gcode_macro CANCEL_PRINT]${white} |" blank_line echo -e "| If you already have these macros in your config file |" echo -e "| you can skip this step and choose 'no'. |" echo -e "| Otherwise you should consider to answer with 'yes' to |" echo -e "| add the recommended example macros to your config. |" bottom_border - read -p "${cyan}###### Add the recommended macros? (Y/n):${default} " yn + read -p "${cyan}###### Add the recommended macros? (Y/n):${white} " yn case "${yn}" in Y|y|Yes|yes|"") echo -e "###### > Yes" @@ -551,7 +551,7 @@ function process_octoprint_dialog(){ while true; do echo top_border - echo -e "| ${red}!!! WARNING - OctoPrint service found !!!${default} |" + echo -e "| ${red}!!! WARNING - OctoPrint service found !!!${white} |" hr echo -e "| You might consider disabling the OctoPrint service, |" echo -e "| since an active OctoPrint service may lead to unex- |"