From 91372f1cdef67594005084161f73d794350d1873 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 14 Jul 2017 02:36:07 +0700 Subject: [PATCH] CPU [Linux]: Add fallback speed method for PowerPC systems. --- CHANGELOG.md | 1 + neofetch | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48ec7a5f..4173e6c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ **CPU** - [Linux] Fixed inaccurate output on ARM SoC devices. +- [Linux] Fixed CPU speed not appearing on PowerPC systems. - [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. diff --git a/neofetch b/neofetch index 7d8c0240..e0574c2c 100755 --- a/neofetch +++ b/neofetch @@ -859,7 +859,8 @@ get_cpu() { speed="$((speed / 1000))" else - speed="$(awk -F ': |\\.' '/cpu MHz/ {printf $2; exit}' /proc/cpuinfo)" + speed="$(awk -F ': |\\.' '/cpu MHz|^clock/ {printf $2; exit}' /proc/cpuinfo)" + speed="${speed/MHz}" fi # Get CPU temp.