From 6901ac4b4f1bdd022543badd349e21f6c6ea6988 Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Sat, 29 Jan 2022 23:23:11 +0100 Subject: cputemp configurable path --- src/utils/cpu.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils/cpu.rs') diff --git a/src/utils/cpu.rs b/src/utils/cpu.rs index f49fda0..cb94f0d 100644 --- a/src/utils/cpu.rs +++ b/src/utils/cpu.rs @@ -4,7 +4,7 @@ use std::fs::read_to_string; // getting cpu temperature pub async fn get_cpu_temp() -> ThreadsData { - let buf = match read_to_string("/sys/class/thermal/thermal_zone0/temp") { + let buf = match read_to_string(&CONFIG.cpu_temperature.path) { Ok(data) => data, _ => return ThreadsData::CpuTemp(String::from("Error reading temp")), }; -- cgit v1.2.3