From 9fb527de0cab53a740fe7a1d3786ae2c89100a0a Mon Sep 17 00:00:00 2001 From: Mattia Basaglia Date: Mon, 8 Oct 2018 12:32:44 +0200 Subject: [PATCH] Add temperature display --- systempony | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/systempony b/systempony index 7e91d8c..fc18a98 100755 --- a/systempony +++ b/systempony @@ -88,6 +88,11 @@ function ponyget_CPU_Usage() printf %.1f%% "$(top -b -n1 | grep "Cpu(s):" | sed -r -e "s/^[^0-9]+//" -e "s/[^0-9]+,\s+/ + /g" -e "s/[^0-9]+$//" | cut -d ' ' -f 1-5 | bc)" } +function ponyget_CPU_Temperature() +{ + echo "$(echo "scale=1; $(cat /sys/devices/virtual/thermal/thermal_zone0/temp) / 1000" | bc) C" +} + function ponyget_Uptime() { uptime | grep -oE "up.*user" | \