Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
ee815f9c
Commit
ee815f9c
authored
Apr 09, 2018
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gpu: Fixed duplicate intel bug.
parent
4083770a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
neofetch
neofetch
+12
-5
No files found.
neofetch
View file @
ee815f9c
...
...
@@ -1284,13 +1284,21 @@ get_gpu() {
{if(!seen[a[i]]++) print a[i]}}'
)
)
IFS="
$old_ifs
"
# Number the GPUs if more than one exists.
((
${#
gpus
[@]
}
> 1)) && gpu_num=1
# Remove duplicate Intel Graphics outputs.
# This fixes cases where the outputs are both
# Intel but not entirely identical.
#
# Checking the first two array elements should
# be safe since there won't be 2 intel outputs if
# there's a dedicated GPU in play.
[[ "
${
gpus
[0]
}
" == *Intel* &&
\
"
${
gpus
[1]
}
" == *Intel* ]] &&
\
unset -v "
gpus[0]
"
for gpu in "
${
gpus
[@]
}
"; do
# GPU shorthand tests.
[[ "
$gpu_type
" == "
dedicated
" && "
$gpu
" =
~ (i|I)ntel ]] ||
\
[[ "
$gpu_type
" == "
integrated
" && ! "
$gpu
" =
~ (i|I)ntel
]] &&
\
[[ "
$gpu_type
" == "
dedicated
" && "
$gpu
" =
= *Intel* ]] ||
\
[[ "
$gpu_type
" == "
integrated
" && ! "
$gpu
" =
= *Intel*
]] &&
\
{ unset -v gpu; continue; }
case "
$gpu
" in
...
...
@@ -1336,7 +1344,6 @@ get_gpu() {
fi
prin "
${
subtitle
:+
${
subtitle
}${
gpu_name
}}
" "
$gpu
"
((++gpu_num))
done
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment