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
66100fc3
Commit
66100fc3
authored
Oct 21, 2016
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use cpu_cores
parent
dc32c0b7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
11 deletions
+15
-11
README.md
README.md
+2
-1
config
config/config
+3
-1
neofetch
neofetch
+9
-8
neofetch.1
neofetch.1
+1
-1
No files found.
README.md
View file @
66100fc3
...
...
@@ -364,7 +364,8 @@ alias neofetch2="neofetch \
NOTE: This only support Linux with cpufreq.
--cpu_shorthand type Shorten the output of CPU
Possible values: name, speed, tiny, on, off
--cpu_cores on/off Whether or not to display the number of CPU cores
--cpu_cores type Whether or not to display the number of CPU cores
Takes: logical. physical, off
--distro_shorthand on/off Shorten the output of distro (tiny, on, off)
NOTE: This is only possible on Linux, macOS, and Solaris
--kernel_shorthand on/off Shorten the output of kernel
...
...
config/config
View file @
66100fc3
...
...
@@ -108,7 +108,9 @@ cpu_display="off"
# CPU Cores
# Display CPU cores in output
# --cpu_cores on/off
# Logical: All virtual cores
# Physical: All physical cores
# --cpu_cores logical, physical, off
cpu_cores
=
"on"
...
...
neofetch
View file @
66100fc3
...
...
@@ -725,9 +725,9 @@ getcpu() {
fi
# Show/hide hyperthreaded cores
case
"
$c
ores_ht
"
in
"on"
) cores=
"
$(
grep
-c
^processor /proc/cpuinfo
)
"
;;
"
off
"
) cores=
"
$(
grep
"^core id"
/proc/cpuinfo |
sort
-u
|
wc
-l
)
"
;;
case
"
$c
pu_cores
"
in
"
logical"
|
"
on"
) cores=
"
$(
grep
-c
^processor /proc/cpuinfo
)
"
;;
"
physical
"
) cores=
"
$(
grep
"^core id"
/proc/cpuinfo |
sort
-u
|
wc
-l
)
"
;;
esac
# Fix for speeds under 1ghz
...
...
@@ -744,9 +744,9 @@ getcpu() {
cpu=
"
$(
sysctl
-n
machdep.cpu.brand_string
)
"
# Show/hide hyperthreaded cores
case
"
$c
ores_ht
"
in
"on"
) cores=
"
$(
sysctl
-n
hw.logicalcpu_max
)
"
;;
"
off
"
) cores=
"
$(
sysctl
-n
hw.physicalcpu_max
)
"
;;
case
"
$c
pu_cores
"
in
"
logical"
|
"
on"
) cores=
"
$(
sysctl
-n
hw.logicalcpu_max
)
"
;;
"
physical
"
) cores=
"
$(
sysctl
-n
hw.physicalcpu_max
)
"
;;
esac
;;
...
...
@@ -922,7 +922,7 @@ getcpu() {
cpu=
"
${
cpu
//with Radeon HD Graphics
}
"
# Add cpu cores to output
[
"
$cpu_cores
"
==
"on
"
] && [
"
$cores
"
] && \
[
"
$cpu_cores
"
!=
"off
"
] && [
"
$cores
"
] && \
cpu=
"
${
cpu
/@/(
${
cores
}
) @
}
"
# Make the output of cpu shorter
...
...
@@ -2956,7 +2956,8 @@ usage() { cat << EOF
NOTE: This only support Linux with cpufreq.
--cpu_shorthand type Shorten the output of CPU
Possible values: name, speed, tiny, on, off
--cpu_cores on/off Whether or not to display the number of CPU cores
--cpu_cores type Whether or not to display the number of CPU cores
Takes: logical. physical, off
--distro_shorthand on/off Shorten the output of distro (tiny, on, off)
NOTE: This is only possible on Linux, macOS, and Solaris
--kernel_shorthand on/off Shorten the output of kernel
...
...
neofetch.1
View file @
66100fc3
...
...
@@ -35,7 +35,7 @@ Shorten the output of CPU
.br
Possible values: name, speed, tiny, on, off
.TP
.B \--cpu_cores '
on
/off'
.B \--cpu_cores '
logical/physical
/off'
Whether or not to display the number of CPU cores
.TP
.B \--distro_shorthand 'on/off'
...
...
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