Fixed cpu whitespace for real this time
This commit is contained in:
parent
b9bb282c8d
commit
18d465a6d2
1 changed files with 2 additions and 1 deletions
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"
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue