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
c98d8f11
Commit
c98d8f11
authored
Mar 15, 2016
by
Andrew Titmuss
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added CPU cores to CPU output
parent
26c04cf7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
6 deletions
+18
-6
README.md
README.md
+1
-0
config
config/config
+5
-0
neofetch
neofetch
+9
-6
neofetch.1
neofetch.1
+3
-0
No files found.
README.md
View file @
c98d8f11
...
...
@@ -293,6 +293,7 @@ alias fetch2="fetch \
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
--kernel_shorthand on/off Shorten the output of kernel
--uptime_shorthand on/off Shorten the output of uptime (tiny, on, off)
--gpu_shorthand on/off Shorten the output of GPU (tiny, on, off)
...
...
config/config
View file @
c98d8f11
...
...
@@ -103,6 +103,11 @@ speed_type="max"
cpu_shorthand
=
"off"
cpu_display
=
"off"
# CPU Cores
# Display CPU cores in output
# --cpu_cores on/off
cpu_cores
=
"on"
# GPU
...
...
neofetch
View file @
c98d8f11
...
...
@@ -125,6 +125,10 @@ speed_type="max"
cpu_shorthand
=
"off"
cpu_display
=
"off"
# CPU Cores
# Display CPU cores in output
# --cpu_cores on/off
cpu_cores
=
"on"
# GPU
...
...
@@ -849,8 +853,6 @@ getcpu () {
speed=
${
speed
:0:1
}
.
${
speed
:1
}
cpu="
$cpu
@
${
speed
}
GHz
"
# Get cpu cores
cores=
$(
awk
-F
': '
'/siblings/ {printf $2; exit}'
/proc/cpuinfo
)
;;
...
...
@@ -875,8 +877,6 @@ getcpu () {
"
FreeBSD
"*) speed=
$(
sysctl
-n
hw.clockrate
)
;;
esac
speed=
$((
speed
/
100
))
# Get cpu cores
cores=
$(
sysctl
-n
hw.ncpu
)
;;
...
...
@@ -897,8 +897,6 @@ getcpu () {
"
NetBSD
"*) speed=
$((
speed
/
10000
))
;;
"
Windows
"*) speed=
$((
speed
/
100000
))
;;
esac
# Get cpu cores
cores=
$(
awk
-F
': '
'/siblings/ {printf $2; exit}'
/proc/cpuinfo
)
;;
esac
...
...
@@ -924,6 +922,10 @@ getcpu () {
cpu=
${
cpu
// Eight-Core
}
cpu=
${
cpu
// with Radeon HD Graphics
}
# Add cpu cores to output
[ "
$cpu_cores
" == "
on
" ] &&
\
cpu=
${
cpu
/@/\(
${
cores
}
\) @
}
# Make the output of cpu shorter
case "
$cpu_shorthand
" in
"
name
")
...
...
@@ -2489,6 +2491,7 @@ 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
--kernel_shorthand on/off Shorten the output of kernel
--uptime_shorthand on/off Shorten the output of uptime (tiny, on, off)
--gpu_shorthand on/off Shorten the output of GPU (tiny, on, off)
...
...
neofetch.1
View file @
c98d8f11
...
...
@@ -41,6 +41,9 @@ Shorten the output of CPU
.br
Possible values: name, speed, tiny, on, off
.TP
.B \--cpu_cores 'on/off'
Whether or not to display the number of CPU cores
.TP
.B \--kernel_shorthand 'on/off'
Shorten the output of kernel
.TP
...
...
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