mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 17:09:21 +00:00
General: Save the old $IFS value
This commit is contained in:
4
neofetch
4
neofetch
@@ -25,6 +25,9 @@ shopt -s nocasematch
|
||||
# Reset colors and bold.
|
||||
reset="\033[0m"
|
||||
|
||||
# Save default IFS value.
|
||||
old_ifs="$IFS"
|
||||
|
||||
# DETECT INFORMATION
|
||||
|
||||
get_os() {
|
||||
@@ -968,6 +971,7 @@ get_gpu() {
|
||||
"Linux")
|
||||
IFS=$'\n'
|
||||
gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}'))
|
||||
IFS="$old_ifs"
|
||||
|
||||
# Number the GPUs if more than one exists.
|
||||
(( "${#gpus[@]}" > 1 )) && gpu_num=1
|
||||
|
Reference in New Issue
Block a user