mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 17:09:21 +00:00
Fixed cpu whitespace for real this time
This commit is contained in:
3
fetch.sh
3
fetch.sh
@@ -450,6 +450,7 @@ getcpu () {
|
||||
# Get cpu name
|
||||
cpu="$(grep 'model name' /proc/cpuinfo)"
|
||||
cpu=${cpu/model name*: /}
|
||||
cpu=${cpu// /}
|
||||
cpu=${cpu% }
|
||||
|
||||
speed=$(grep 'cpu MHz' /proc/cpuinfo)
|
||||
@@ -457,7 +458,7 @@ getcpu () {
|
||||
speed=${speed/\./}
|
||||
|
||||
# Convert mhz to ghz without bc
|
||||
speed=$((${speed} / 1000))
|
||||
speed=$((${speed} / 100000))
|
||||
speed=${speed:0:1}.${speed:1}
|
||||
cpu="$cpu @ ${speed}GHz"
|
||||
;;
|
||||
|
Reference in New Issue
Block a user