mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
fixes and tweaks
This commit is contained in:
parent
cff962b5e7
commit
5b6a704401
28
inxi
28
inxi
|
@ -308,9 +308,9 @@ 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=''
|
||||||
CONSOLE_IRC_COLOR_SCHEME=''
|
IRC_TERM_COLOR_SCHEME=''
|
||||||
CONSOLE_COLOR_SCHEME=''
|
CONSOLE_COLOR_SCHEME=''
|
||||||
VIRT_TERMINAL_COLOR_SCHEME=''
|
VIRT_TERM_COLOR_SCHEME=''
|
||||||
|
|
||||||
# Default indentation level
|
# Default indentation level
|
||||||
INDENT=10
|
INDENT=10
|
||||||
|
@ -560,16 +560,16 @@ main()
|
||||||
set_color_scheme $GLOBAL_COLOR_SCHEME
|
set_color_scheme $GLOBAL_COLOR_SCHEME
|
||||||
elif [[ -n $CONSOLE_COLOR_SCHEME && -z $DISPLAY ]];then
|
elif [[ -n $CONSOLE_COLOR_SCHEME && -z $DISPLAY ]];then
|
||||||
set_color_scheme $CONSOLE_COLOR_SCHEME
|
set_color_scheme $CONSOLE_COLOR_SCHEME
|
||||||
elif [[ -n $VIRT_TERMINAL_COLOR_SCHEME ]];then
|
elif [[ -n $VIRT_TERM_COLOR_SCHEME ]];then
|
||||||
set_color_scheme $VIRT_TERMINAL_COLOR_SCHEME
|
set_color_scheme $VIRT_TERM_COLOR_SCHEME
|
||||||
else
|
else
|
||||||
set_color_scheme "$DEFAULT_COLOR_SCHEME"
|
set_color_scheme "$DEFAULT_COLOR_SCHEME"
|
||||||
fi
|
fi
|
||||||
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 $CONSOLE_IRC_COLOR_SCHEME && -z $DISPLAY ]];then
|
elif [[ -n $IRC_TERM_COLOR_SCHEME && -z $DISPLAY ]];then
|
||||||
set_color_scheme $CONSOLE_IRC_COLOR_SCHEME
|
set_color_scheme $IRC_TERM_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
|
||||||
|
@ -872,13 +872,13 @@ select_default_color_scheme()
|
||||||
config_variable='IRC_COLOR_SCHEME'
|
config_variable='IRC_COLOR_SCHEME'
|
||||||
;;
|
;;
|
||||||
irc-terminal)
|
irc-terminal)
|
||||||
config_variable='CONSOLE_IRC_COLOR_SCHEME'
|
config_variable='IRC_TERM_COLOR_SCHEME'
|
||||||
;;
|
;;
|
||||||
terminal)
|
terminal)
|
||||||
config_variable='CONSOLE_COLOR_SCHEME'
|
config_variable='CONSOLE_COLOR_SCHEME'
|
||||||
;;
|
;;
|
||||||
virtual-terminal)
|
virtual-terminal)
|
||||||
config_variable='VIRT_TERMINAL_COLOR_SCHEME'
|
config_variable='VIRT_TERM_COLOR_SCHEME'
|
||||||
;;
|
;;
|
||||||
global)
|
global)
|
||||||
config_variable='GLOBAL_COLOR_SCHEME'
|
config_variable='GLOBAL_COLOR_SCHEME'
|
||||||
|
@ -902,19 +902,21 @@ select_default_color_scheme()
|
||||||
sed -i '/GLOBAL_COLOR_SCHEME=/d' $config_file
|
sed -i '/GLOBAL_COLOR_SCHEME=/d' $config_file
|
||||||
;;
|
;;
|
||||||
global)
|
global)
|
||||||
sed -i -e '/VIRT_TERMINAL_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 '/CONSOLE_IRC_COLOR_SCHEME=/d' $config_file
|
-e '/IRC_TERM_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_TERMINAL_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 '/CONSOLE_IRC_COLOR_SCHEME=/d' $config_file
|
-e '/IRC_COLOR_SCHEME=/d' -e '/IRC_TERM_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"
|
||||||
if [[ -n $CONSOLE_COLOR_SCHEME ]];then
|
if [[ -n $CONSOLE_COLOR_SCHEME && -z $DISPLAY ]];then
|
||||||
set_color_scheme $CONSOLE_COLOR_SCHEME
|
set_color_scheme $CONSOLE_COLOR_SCHEME
|
||||||
|
elif [[ -n $VIRT_TERM_COLOR_SCHEME ]];then
|
||||||
|
set_color_scheme $VIRT_TERM_COLOR_SCHEME
|
||||||
else
|
else
|
||||||
set_color_scheme $DEFAULT_COLOR_SCHEME
|
set_color_scheme $DEFAULT_COLOR_SCHEME
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue