From 4dba6f2e09e123d31d1c774407e989627f4e8951 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Wed, 6 Jan 2016 09:01:21 +1100 Subject: [PATCH] Windows: Fixed cpu whitespace issue --- fetch.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fetch.sh b/fetch.sh index 8b71fa8b..aa7b0e15 100755 --- a/fetch.sh +++ b/fetch.sh @@ -63,6 +63,7 @@ use_wmctrl=0 # CPU # CPU speed type +# Only works on Linux # --speed_type current/min/max speed_type="max" @@ -472,10 +473,9 @@ getcpu () { # Get cpu name cpu="$(grep 'model name' /proc/cpuinfo)" cpu=${cpu/model name*: /} - cpu=${cpu// /} - cpu=${cpu% } - cpu=${cpu/@*/} + cpu=${cpu/ @*/} + # Get cpu speed speed=$(grep 'cpu MHz' /proc/cpuinfo) speed=${speed/cpu MHz*: /} speed=${speed/\./}