General: Save the old $IFS value
This commit is contained in:
parent
7b0e03ee6e
commit
25400f7f00
4
neofetch
4
neofetch
|
@ -25,6 +25,9 @@ shopt -s nocasematch
|
||||||
# Reset colors and bold.
|
# Reset colors and bold.
|
||||||
reset="\033[0m"
|
reset="\033[0m"
|
||||||
|
|
||||||
|
# Save default IFS value.
|
||||||
|
old_ifs="$IFS"
|
||||||
|
|
||||||
# DETECT INFORMATION
|
# DETECT INFORMATION
|
||||||
|
|
||||||
get_os() {
|
get_os() {
|
||||||
|
@ -968,6 +971,7 @@ get_gpu() {
|
||||||
"Linux")
|
"Linux")
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}'))
|
gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}'))
|
||||||
|
IFS="$old_ifs"
|
||||||
|
|
||||||
# Number the GPUs if more than one exists.
|
# Number the GPUs if more than one exists.
|
||||||
(( "${#gpus[@]}" > 1 )) && gpu_num=1
|
(( "${#gpus[@]}" > 1 )) && gpu_num=1
|
||||||
|
|
Reference in New Issue