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
0fdd3b86
Commit
0fdd3b86
authored
Dec 15, 2016
by
Herdiansyah
Committed by
GitHub
Dec 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CPU [Linux]: Added CPU name detection for more architectures (#529)
This fixes #526.
parent
f64ecff4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
CHANGELOG.md
CHANGELOG.md
+4
-0
neofetch
neofetch
+18
-1
No files found.
CHANGELOG.md
View file @
0fdd3b86
...
@@ -34,6 +34,10 @@ Neofetch now has an irc channel at `#neofetch` on Freenode. If you have any ques
...
@@ -34,6 +34,10 @@ Neofetch now has an irc channel at `#neofetch` on Freenode. If you have any ques
-
[
Fish
]
Fixed memory leak caused by Fish.
-
[
Fish
]
Fixed memory leak caused by Fish.
**CPU**
<br
\>
-
[
Linux
]
Fixed issues with CPU name detection for architectures other than x86/amd64/ARM.
**Desktop Environment**
<br
\>
**Desktop Environment**
<br
\>
-
Fixed issues where MATE wouldn't be detected properly.
-
Fixed issues where MATE wouldn't be detected properly.
...
...
neofetch
View file @
0fdd3b86
...
@@ -734,7 +734,23 @@ get_cpu() {
...
@@ -734,7 +734,23 @@ get_cpu() {
# Get CPU name
# Get CPU name
case
"
$distro
"
in
case
"
$distro
"
in
"Android"
*) cpu=
"
$(
getprop ro.product.board
)
"
;;
"Android"
*) cpu=
"
$(
getprop ro.product.board
)
"
;;
*) cpu=
"
$(
awk
-F
': | @'
'/model name|Processor/ {printf $2; exit}'
/proc/cpuinfo
)
"
;;
*)
case
"
$machine_arch
"
in
"frv"
|
"hppa"
|
"m68k"
|
"openrisc"
|
"or"
* |
"powerpc"
|
"ppc"
* |
"sparc"
*)
cpu=
"
$(
awk
-F
':'
'/^cpu\t|^CPU/ {printf $2; exit}'
/proc/cpuinfo
)
"
;;
"s390"
*)
cpu=
"
$(
awk
-F
'='
'/machine/ {print $4; exit}'
/proc/cpuinfo
)
"
;;
"ia64"
|
"m32r"
)
cpu=
"
$(
awk
-F
':'
'/model/ {print $2; exit}'
/proc/cpuinfo
)
"
[[ -z
"
$cpu
"
]] && cpu=
"
$(
awk
-F
':'
'/family/ {printf $2; exit}'
/proc/cpuinfo
)
"
;;
*)
cpu=
"
$(
awk
-F
': | @'
'/model name|Processor|^cpu model|chip type|^cpu type/ {printf $2; exit}'
/proc/cpuinfo
)
"
;;
esac
;;
esac
esac
speed_dir=
"/sys/devices/system/cpu/cpu0/cpufreq"
speed_dir=
"/sys/devices/system/cpu/cpu0/cpufreq"
...
@@ -888,6 +904,7 @@ get_cpu() {
...
@@ -888,6 +904,7 @@ get_cpu() {
cpu=
"
${
cpu
//Eight-Core
}
"
cpu=
"
${
cpu
//Eight-Core
}
"
cpu=
"
${
cpu
//Core
}
"
cpu=
"
${
cpu
//Core
}
"
cpu=
"
${
cpu
//with Radeon * Graphics
}
"
cpu=
"
${
cpu
//with Radeon * Graphics
}
"
cpu=
"
${
cpu
//, altivec supported
}
"
# Add cpu cores to output
# Add cpu cores to output
[[
"
$cpu_cores
"
!=
"off"
&&
"
$cores
"
]] && \
[[
"
$cpu_cores
"
!=
"off"
&&
"
$cores
"
]] && \
...
...
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