made console out of x, and terminal in x for variables

This commit is contained in:
inxi-svn 2011-04-26 08:46:20 +00:00
parent 130af28e1f
commit 585519855c

28
inxi
View file

@ -308,7 +308,7 @@ DEFAULT_COLOR_SCHEME=2
# for user changes easier after sourcing the files # for user changes easier after sourcing the files
GLOBAL_COLOR_SCHEME='' GLOBAL_COLOR_SCHEME=''
IRC_COLOR_SCHEME='' IRC_COLOR_SCHEME=''
IRC_TERM_COLOR_SCHEME='' IRC_CONS_COLOR_SCHEME=''
CONSOLE_COLOR_SCHEME='' CONSOLE_COLOR_SCHEME=''
VIRT_TERM_COLOR_SCHEME='' VIRT_TERM_COLOR_SCHEME=''
@ -568,8 +568,8 @@ main()
else else
if [[ -n $GLOBAL_COLOR_SCHEME ]];then if [[ -n $GLOBAL_COLOR_SCHEME ]];then
set_color_scheme $GLOBAL_COLOR_SCHEME set_color_scheme $GLOBAL_COLOR_SCHEME
elif [[ -n $IRC_TERM_COLOR_SCHEME && -z $DISPLAY ]];then elif [[ -n $IRC_CONS_COLOR_SCHEME && -z $DISPLAY ]];then
set_color_scheme $IRC_TERM_COLOR_SCHEME set_color_scheme $IRC_CONS_COLOR_SCHEME
elif [[ -n $IRC_COLOR_SCHEME ]];then elif [[ -n $IRC_COLOR_SCHEME ]];then
set_color_scheme $IRC_COLOR_SCHEME set_color_scheme $IRC_COLOR_SCHEME
else else
@ -860,9 +860,9 @@ select_default_color_scheme()
print_screen_output " $(($i+2)))$spacer Exit, use another terminal, or set manually." print_screen_output " $(($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 95 (terminal)," print_screen_output "and hit ENTER. NOTE: You can bring this option list up by starting $SCRIPT_NAME with option: -c 95 (console),"
print_screen_output "96 (virtual-terminal), 97 (irc), 98 (irc-terminal), 99 (global). Your selection(s) will be stored here: $config_file" print_screen_output "96 (virtual-terminal), 97 (irc), 98 (irc-console), 99 (global). Your selection(s) will be stored here: $config_file"
print_screen_output "Global overrides virtual-terminal/terminal/irc/irc-terminal. Irc/irc-terminal/virtual-terminal/terminal removes global." print_screen_output "Global overrides virtual-terminal/console/irc/irc-console. Irc/irc-console/virtual-terminal/console removes global."
print_screen_output "------------------------------------------------------------------------------" print_screen_output "------------------------------------------------------------------------------"
echo -n "" echo -n ""
read user_selection read user_selection
@ -871,10 +871,10 @@ select_default_color_scheme()
irc) irc)
config_variable='IRC_COLOR_SCHEME' config_variable='IRC_COLOR_SCHEME'
;; ;;
irc-terminal) irc-console)
config_variable='IRC_TERM_COLOR_SCHEME' config_variable='IRC_CONS_COLOR_SCHEME'
;; ;;
terminal) console)
config_variable='CONSOLE_COLOR_SCHEME' config_variable='CONSOLE_COLOR_SCHEME'
;; ;;
virtual-terminal) virtual-terminal)
@ -898,18 +898,18 @@ select_default_color_scheme()
fi fi
# file exists now so we can go on to cleanup # file exists now so we can go on to cleanup
case $COLOR_SELECTION in case $COLOR_SELECTION in
irc|irc-terminal|terminal|virtual-terminal) irc|irc-console|console|virtual-terminal)
sed -i '/GLOBAL_COLOR_SCHEME=/d' $config_file sed -i '/GLOBAL_COLOR_SCHEME=/d' $config_file
;; ;;
global) global)
sed -i -e '/VIRT_TERM_COLOR_SCHEME=/d' -e '/CONSOLE_COLOR_SCHEME=/d' -e '/IRC_COLOR_SCHEME=/d' \ sed -i -e '/VIRT_TERM_COLOR_SCHEME=/d' -e '/CONSOLE_COLOR_SCHEME=/d' -e '/IRC_COLOR_SCHEME=/d' \
-e '/IRC_TERM_COLOR_SCHEME=/d' $config_file -e '/IRC_CONS_COLOR_SCHEME=/d' $config_file
;; ;;
esac esac
elif [[ $user_selection == $i ]];then elif [[ $user_selection == $i ]];then
print_screen_output "Removing all color settings from config file now..." print_screen_output "Removing all color settings from config file now..."
sed -i -e '/VIRT_TERM_COLOR_SCHEME=/d' -e '/GLOBAL_COLOR_SCHEME=/d' -e '/CONSOLE_COLOR_SCHEME=/d' \ sed -i -e '/VIRT_TERM_COLOR_SCHEME=/d' -e '/GLOBAL_COLOR_SCHEME=/d' -e '/CONSOLE_COLOR_SCHEME=/d' \
-e '/IRC_COLOR_SCHEME=/d' -e '/IRC_TERM_COLOR_SCHEME=/d' $config_file -e '/IRC_COLOR_SCHEME=/d' -e '/IRC_CONS_COLOR_SCHEME=/d' $config_file
set_color_scheme $DEFAULT_COLOR_SCHEME set_color_scheme $DEFAULT_COLOR_SCHEME
elif [[ $user_selection == $(( $i+1 )) ]];then elif [[ $user_selection == $(( $i+1 )) ]];then
print_screen_output "Ok, continuing $SCRIPT_NAME unchanged. You can set the colors anytime by starting with: -c 96 to 99" print_screen_output "Ok, continuing $SCRIPT_NAME unchanged. You can set the colors anytime by starting with: -c 96 to 99"
@ -1246,7 +1246,7 @@ get_parameters()
;; ;;
98) 98)
B_RUN_COLOR_SELECTOR='true' B_RUN_COLOR_SELECTOR='true'
COLOR_SELECTION='irc-terminal' COLOR_SELECTION='irc-console'
;; ;;
97) 97)
B_RUN_COLOR_SELECTOR='true' B_RUN_COLOR_SELECTOR='true'
@ -1258,7 +1258,7 @@ get_parameters()
;; ;;
95) 95)
B_RUN_COLOR_SELECTOR='true' B_RUN_COLOR_SELECTOR='true'
COLOR_SELECTION='terminal' COLOR_SELECTION='console'
;; ;;
*) *)
B_COLOR_SCHEME_SET='true' B_COLOR_SCHEME_SET='true'