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
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.4.82-b6
|
#### version: 1.4.82-b7
|
||||||
#### Date: April 25 2011
|
#### Date: April 25 2011
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### 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"
|
print_screen_output "[0m $i)$spacer${C1} Card:${C2} nVidia G86 [GeForce 8400 GS] ${C1}X.Org${C2} 1.7.7"
|
||||||
done
|
done
|
||||||
set_color_scheme 0
|
set_color_scheme 0
|
||||||
print_screen_output "[0m $i)$spacer Continue, no changes or config file setting."
|
print_screen_output "[0m $i)$spacer Remove all color settings. Restore $SCRIPT_NAME default."
|
||||||
print_screen_output "[0m $(($i+1)))$spacer Exit, use another terminal, or set manually."
|
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 "------------------------------------------------------------------------------"
|
||||||
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 "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"
|
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
|
sed -i '/DEFAULT_GLOBAL_COLOR_SCHEME=/d' $config_file
|
||||||
;;
|
;;
|
||||||
global)
|
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
|
esac
|
||||||
elif [[ $user_selection == $i ]];then
|
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
|
if [[ -n $DEFAULT_TERM_COLOR_SCHEME ]];then
|
||||||
set_color_scheme $DEFAULT_TERM_COLOR_SCHEME
|
set_color_scheme $DEFAULT_TERM_COLOR_SCHEME
|
||||||
else
|
else
|
||||||
set_color_scheme $DEFAULT_COLOR_SCHEME
|
set_color_scheme $DEFAULT_COLOR_SCHEME
|
||||||
fi
|
fi
|
||||||
elif [[ $user_selection == $(( $i+1 )) ]];then
|
elif [[ $user_selection == $(( $i+2 )) ]];then
|
||||||
set_color_scheme $DEFAULT_COLOR_SCHEME
|
set_color_scheme $DEFAULT_COLOR_SCHEME
|
||||||
print_screen_output "Ok, exiting $SCRIPT_NAME now. You can set the colors later."
|
print_screen_output "Ok, exiting $SCRIPT_NAME now. You can set the colors later."
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in a new issue