CPU Temp: Fix issue with old values
This commit is contained in:
parent
3f7dd84ef8
commit
db22297738
13
neofetch
13
neofetch
|
@ -2825,11 +2825,13 @@ get_user_config() {
|
||||||
if [[ -f "$config_file" ]]; then
|
if [[ -f "$config_file" ]]; then
|
||||||
source "$config_file"
|
source "$config_file"
|
||||||
err "Config: Sourced user config. (${config_file})"
|
err "Config: Sourced user config. (${config_file})"
|
||||||
|
old_options
|
||||||
return
|
return
|
||||||
|
|
||||||
elif [[ "$config_file" == "travis" ]]; then
|
elif [[ "$config_file" == "travis" ]]; then
|
||||||
source "$travis_config"
|
source "$travis_config"
|
||||||
err "Config: Sourced user config. (${travis_config})"
|
err "Config: Sourced user config. (${travis_config})"
|
||||||
|
old_options
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
mkdir -p "${XDG_CONFIG_HOME}/neofetch/"
|
mkdir -p "${XDG_CONFIG_HOME}/neofetch/"
|
||||||
|
@ -2856,8 +2858,6 @@ get_user_config() {
|
||||||
|
|
||||||
source "$config_file"
|
source "$config_file"
|
||||||
err "Config: Sourced user config. (${config_file})"
|
err "Config: Sourced user config. (${config_file})"
|
||||||
|
|
||||||
# Check for deprecated options.
|
|
||||||
old_options
|
old_options
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3009,6 +3009,9 @@ old_options() {
|
||||||
|
|
||||||
# $start and $end were replaced with ${block_range[@]} in 2.1.0.
|
# $start and $end were replaced with ${block_range[@]} in 2.1.0.
|
||||||
[[ "$start" && "$end" ]] && { err "Config: \$start and \$end are deprecated, use block_range=(0 7) instead."; block_range=("$start" "$end"); }
|
[[ "$start" && "$end" ]] && { err "Config: \$start and \$end are deprecated, use block_range=(0 7) instead."; block_range=("$start" "$end"); }
|
||||||
|
|
||||||
|
# Fahrenheit support was added to CPU so the options were changed.
|
||||||
|
[[ "$cpu_temp" == "on" ]] && { err "Config: cpu_temp='on' is deprecated, use cpu_temp='C' or 'F' instead."; cpu_temp="C"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
cache_uname() {
|
cache_uname() {
|
||||||
|
@ -3336,7 +3339,6 @@ get_args() {
|
||||||
"--os_arch") os_arch="$2" ;;
|
"--os_arch") os_arch="$2" ;;
|
||||||
"--cpu_cores") cpu_cores="$2" ;;
|
"--cpu_cores") cpu_cores="$2" ;;
|
||||||
"--cpu_speed") cpu_speed="$2" ;;
|
"--cpu_speed") cpu_speed="$2" ;;
|
||||||
"--cpu_temp") cpu_temp="$2" ;;
|
|
||||||
"--speed_type") speed_type="$2" ;;
|
"--speed_type") speed_type="$2" ;;
|
||||||
"--distro_shorthand") distro_shorthand="$2" ;;
|
"--distro_shorthand") distro_shorthand="$2" ;;
|
||||||
"--kernel_shorthand") kernel_shorthand="$2" ;;
|
"--kernel_shorthand") kernel_shorthand="$2" ;;
|
||||||
|
@ -3354,6 +3356,11 @@ get_args() {
|
||||||
"--song_shorthand") song_shorthand="$2" ;;
|
"--song_shorthand") song_shorthand="$2" ;;
|
||||||
"--install_time") install_time="$2" ;;
|
"--install_time") install_time="$2" ;;
|
||||||
"--install_time_format") install_time_format="$2" ;;
|
"--install_time_format") install_time_format="$2" ;;
|
||||||
|
"--cpu_temp")
|
||||||
|
cpu_temp="$2"
|
||||||
|
[[ "$cpu_temp" == "on" ]] && cpu_temp="C"
|
||||||
|
;;
|
||||||
|
|
||||||
"--disable")
|
"--disable")
|
||||||
for func in "$@"; do
|
for func in "$@"; do
|
||||||
case "$func" in
|
case "$func" in
|
||||||
|
|
Reference in New Issue