From 697c2c26dcbe58cd40ed776b282429e407465a77 Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Mon, 19 Dec 2022 12:32:21 -0800 Subject: temperature: fix cpu temperature reading --- dot_config/i3/i3blocks.conf | 4 ++-- dot_config/i3/scripts/executable_temperature | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dot_config/i3/i3blocks.conf b/dot_config/i3/i3blocks.conf index dd9f5ac..2787340 100644 --- a/dot_config/i3/i3blocks.conf +++ b/dot_config/i3/i3blocks.conf @@ -99,10 +99,10 @@ markup=pango [CPU-temperature] label= command=~/.config/i3/scripts/temperature -interval=30 +interval=1 #T_WARN=70 #T_CRIT=90 -#SENSOR_CHIP="" +SENSOR_CHIP="coretemp-isa-0000" # where SENSOR_CHIP can be find with sensors output # can be used also for GPU temperature or other temperature sensors lm-sensors detects. diff --git a/dot_config/i3/scripts/executable_temperature b/dot_config/i3/scripts/executable_temperature index 4e31610..a4d5f9e 100644 --- a/dot_config/i3/scripts/executable_temperature +++ b/dot_config/i3/scripts/executable_temperature @@ -51,7 +51,7 @@ open (SENSORS, "sensors -u $chip |") or die; while () { if (/^\s+temp1_input:\s+[\+]*([\-]*\d+\.\d)/) { $temperature = $1; - last; + last; } } close(SENSORS); -- cgit v1.2.3