mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
added restore to default option
This commit is contained in:
parent
5c614335df
commit
1f29775266
17
inxi
17
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 "[0m $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 "[0m $i)$spacer Continue, no changes or config file setting."
|
||||
print_screen_output "[0m $(($i+1)))$spacer Exit, use another terminal, or set manually."
|
||||
print_screen_output "[0m $i)$spacer Remove all color settings. Restore $SCRIPT_NAME default."
|
||||
print_screen_output "[0m $(($i+1)))$spacer Continue, no changes or config file setting."
|
||||
print_screen_output "[0m $(($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
|
||||
|
|
Loading…
Reference in a new issue