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
1be4af24
Commit
1be4af24
authored
Jul 13, 2017
by
Herdiansyah
Committed by
GitHub
Jul 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #771 from konimex/cpu
CPU: Fix inaccurate speed for processors below 1GHz
parents
403e66e7
8f975faa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
CHANGELOG.md
CHANGELOG.md
+1
-0
config.conf
config/config.conf
+1
-0
neofetch
neofetch
+7
-9
neofetch.1
neofetch.1
+2
-0
No files found.
CHANGELOG.md
View file @
1be4af24
...
...
@@ -18,6 +18,7 @@
-
[
Linux
]
Fixed inaccurate output on ARM SoC devices.
-
[
NetBSD
]
Added support for CPU temperature. (NOTE: This only supports newer Intel processors)
-
Fixed inaccurate speed output in systems with CPU speed less than 1 GHz.
**Terminal**
...
...
config/config.conf
View file @
1be4af24
...
...
@@ -142,6 +142,7 @@ speed_type="bios_limit"
# Default: 'off'
# Values: 'on', 'off'.
# Flag: --speed_shorthand.
# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz
#
# Example:
# on: 'i7-6500U (4) @ 3.1GHz'
...
...
neofetch
View file @
1be4af24
...
...
@@ -1014,18 +1014,13 @@ get_cpu() {
esac
if [[
"
$speed
"
]]; then
# Hide decimals if on.
[[
"
$speed_shorthand
"
==
"on"
]] && \
speed=
"
$((
speed
/
100
))
"
# Fix for speeds under 1ghz.
if [[ -z
"
${
speed
:1
}
"
]]; then
speed=
"0.
${
speed
}
"
if (( speed < 1000 )); then
cpu=
"
$cpu
@
${
speed
}
MHz
$temp
"
else
[[
"
$speed_shorthand
"
==
"on"
]] && speed=
"
$((
speed
/
100
))
"
speed=
"
${
speed
:0:1
}
.
${
speed
:1
}
"
cpu=
"
$cpu
@
${
speed
}
GHz
$temp
"
fi
cpu=
"
$cpu
@
${
speed
}
GHz
$temp
"
fi
# Remove un-needed patterns from cpu output.
...
...
@@ -3956,6 +3951,9 @@ INFO:
NOTE: This only supports Linux with cpufreq.
--speed_shorthand on/off Whether or not to show decimals in CPU speed.
NOTE: This flag is not supported in systems with CPU speed less than 1 GHz.
--cpu_shorthand type Shorten the output of CPU
Possible values: name, speed, tiny, on, off
--cpu_cores type Whether or not to display the number of CPU cores
...
...
neofetch.1
View file @
1be4af24
...
...
@@ -32,6 +32,8 @@ NOTE: This only supports Linux with cpufreq.
.TP
\fB\-\-speed_shorthand\fR on/off
Whether or not to show decimals in CPU speed.
.IP
NOTE: This flag is not supported in systems with CPU speed less than 1 GHz.
.TP
\fB\-\-cpu_shorthand\fR type
Shorten the output of CPU
...
...
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