diff options
| author | Alexandre C. <alexandre.cuvillier59@gmail.com> | 2025-06-24 03:02:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-24 11:02:07 +1000 |
| commit | 113134d61d15fd35ecadafe4972075f4333c9eeb (patch) | |
| tree | f143518421c6d643c76b885b9ef5e70e9741f686 /services/SystemUsage.qml | |
| parent | wallpapers: only preview dynamic if current (diff) | |
| download | caelestia-shell-113134d61d15fd35ecadafe4972075f4333c9eeb.tar.gz caelestia-shell-113134d61d15fd35ecadafe4972075f4333c9eeb.tar.bz2 caelestia-shell-113134d61d15fd35ecadafe4972075f4333c9eeb.zip | |
systemusage: fix CPU temps for AMD CPUs (#150)
Diffstat (limited to 'services/SystemUsage.qml')
| -rw-r--r-- | services/SystemUsage.qml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/services/SystemUsage.qml b/services/SystemUsage.qml index 849070a..d015d2f 100644 --- a/services/SystemUsage.qml +++ b/services/SystemUsage.qml @@ -160,7 +160,11 @@ Singleton { }) stdout: StdioCollector { onStreamFinished: { - const cpuTemp = text.match(/Package id [0-9]+: *((\+|-)[0-9.]+)(°| )C/); + const cpuTemp = text.match(/(?:Package id [0-9]+|Tdie):\s+((\+|-)[0-9.]+)(°| )C/); + if (!cpuTemp) { + // If AMD Tdie pattern failed, try fallback on Tctl + const cpuTemp = text.match(/Tctl:\s+((\+|-)[0-9.]+)(°| )C/); + } if (cpuTemp) root.cpuTemp = parseFloat(cpuTemp[1]); |