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
6a37a9bb
Commit
6a37a9bb
authored
Oct 21, 2016
by
Dylan Araps
Committed by
GitHub
Oct 21, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #381 from dylanaraps/cores
Add option to hide/show hyperthreaded cpu cores.
parents
e11d40cd
3123548c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
11 deletions
+33
-11
README.md
README.md
+3
-1
config
config/config
+5
-2
neofetch
neofetch
+20
-6
neofetch.1
neofetch.1
+5
-2
No files found.
README.md
View file @
6a37a9bb
...
...
@@ -364,7 +364,9 @@ 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
Note: 'physical' doesn't work on BSD.
--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 @
6a37a9bb
...
...
@@ -108,8 +108,11 @@ cpu_display="off"
# CPU Cores
# Display CPU cores in output
# --cpu_cores on/off
cpu_cores
=
"on"
# Logical: All virtual cores
# Physical: All physical cores
# --cpu_cores logical, physical, off
# Note: 'physical' doesn't work on BSD.
cpu_cores
=
"logical"
# GPU
...
...
neofetch
View file @
6a37a9bb
...
...
@@ -724,7 +724,11 @@ getcpu() {
speed=
"
$((
speed
/
100
))
"
fi
cores=
"
$(
grep
-c
^processor /proc/cpuinfo
)
"
# Show/hide hyperthreaded cores
case
"
$cpu_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
if [ -z
"
${
speed
:1
}
"
]; then
...
...
@@ -738,7 +742,12 @@ getcpu() {
"Mac OS X"
)
cpu=
"
$(
sysctl
-n
machdep.cpu.brand_string
)
"
cores=
"
$(
sysctl
-n
hw.ncpu
)
"
# Show/hide hyperthreaded cores
case
"
$cpu_cores
"
in
"logical"
|
"on"
) cores=
"
$(
sysctl
-n
hw.logicalcpu_max
)
"
;;
"physical"
) cores=
"
$(
sysctl
-n
hw.physicalcpu_max
)
"
;;
esac
;;
"iPhone OS"
)
...
...
@@ -884,8 +893,11 @@ getcpu() {
speed=
"
$(
psrinfo
-v
|
awk
'/operates at/ {print $6}'
)
"
speed=
"
$((
speed
/
100
))
"
# Get cpu cores
cores=
"
$(
kstat
-m
cpu_info |
grep
-c
"chip_id"
)
"
# Show/hide hyperthreaded cores
case
"
$cpu_cores
"
in
"logical"
|
"on"
) cores=
"
$(
kstat
-m
cpu_info |
grep
-c
"chip_id"
)
"
;;
"physical"
) cores=
"
$(
psrinfo
-p
)
"
;;
esac
# Fix for speeds under 1ghz
if [ -z
"
${
speed
:1
}
"
]; then
...
...
@@ -913,7 +925,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
...
...
@@ -2948,7 +2960,9 @@ 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
Note: 'physical' doesn't work on BSD.
--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 @
6a37a9bb
...
...
@@ -35,8 +35,10 @@ 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
.br
Note: 'physical' doesn't work on BSD.
.TP
.B \--distro_shorthand 'on/off'
Shorten the output of distro (tiny, on, off)
...
...
@@ -51,7 +53,8 @@ Shorten the output of uptime (tiny, on, off)
.TP
.B \--refresh_rate 'on/off'
Whether to display the refresh rate of each monitor
Unsupported on Windows
.br
Note: Unsupported on Windows
.TP
.B \--gpu_shorthand 'on/off'
Shorten the output of GPU (tiny, 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