From 1f297752661dab16df03620e340cdc83367547ed Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Tue, 26 Apr 2011 06:20:41 +0000 Subject: [PATCH] added restore to default option --- inxi | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/inxi b/inxi index 05e7e92..4886d77 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.4.82-b6 +#### version: 1.4.82-b7 #### Date: April 25 2011 ######################################################################## #### SPECIAL THANKS @@ -847,8 +847,9 @@ select_default_color_scheme() print_screen_output " $i)$spacer${C1} Card:${C2} nVidia G86 [GeForce 8400 GS] ${C1}X.Org${C2} 1.7.7" done set_color_scheme 0 - print_screen_output " $i)$spacer Continue, no changes or config file setting." - print_screen_output " $(($i+1)))$spacer Exit, use another terminal, or set manually." + print_screen_output " $i)$spacer Remove all color settings. Restore $SCRIPT_NAME default." + print_screen_output " $(($i+1)))$spacer Continue, no changes or config file setting." + print_screen_output " $(($i+2)))$spacer Exit, use another terminal, or set manually." print_screen_output "------------------------------------------------------------------------------" print_screen_output "Simply type the number for the color scheme that looks best to your eyes for your $COLOR_SELECTION settings" print_screen_output "and hit ENTER. NOTE: You can bring this option list up by starting $SCRIPT_NAME with option: -c 97 to 99" @@ -887,17 +888,21 @@ select_default_color_scheme() sed -i '/DEFAULT_GLOBAL_COLOR_SCHEME=/d' $config_file ;; global) - sed -i -e '/DEFAULT_TERM_COLOR_SCHEME=/d' -e '/DEFAULT_IRC_COLOR_SCHEME/d' $config_file + sed -i -e '/DEFAULT_TERM_COLOR_SCHEME=/d' -e '/DEFAULT_IRC_COLOR_SCHEME=/d' $config_file ;; esac elif [[ $user_selection == $i ]];then - print_screen_output "Ok, continuing $SCRIPT_NAME using defaults. You can set the colors anytime by starting with: -c 97, 98, or 99" + print_screen_output "Removing all color settings from config file now..." + sed -i -e '/DEFAULT_GLOBAL_COLOR_SCHEME=/d' -e '/DEFAULT_TERM_COLOR_SCHEME=/d' -e '/DEFAULT_IRC_COLOR_SCHEME=/d' $config_file + set_color_scheme $DEFAULT_COLOR_SCHEME + elif [[ $user_selection == $(( $i+1 )) ]];then + print_screen_output "Ok, continuing $SCRIPT_NAME unchanged. You can set the colors anytime by starting with: -c 97, 98, or 99" if [[ -n $DEFAULT_TERM_COLOR_SCHEME ]];then set_color_scheme $DEFAULT_TERM_COLOR_SCHEME else set_color_scheme $DEFAULT_COLOR_SCHEME fi - elif [[ $user_selection == $(( $i+1 )) ]];then + elif [[ $user_selection == $(( $i+2 )) ]];then set_color_scheme $DEFAULT_COLOR_SCHEME print_screen_output "Ok, exiting $SCRIPT_NAME now. You can set the colors later." exit 0