diff options
| author | Alexandre C. <alexandre.cuvillier59@gmail.com> | 2025-06-24 04:47:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-24 12:47:29 +1000 |
| commit | 9c0223da60dac83fc8d0d9dc17b332882c986eb1 (patch) | |
| tree | 84deeb560f9f0c5b49c643396aec09e966831645 /services | |
| parent | systemusage: fix CPU temps for AMD CPUs (#150) (diff) | |
| download | caelestia-shell-9c0223da60dac83fc8d0d9dc17b332882c986eb1.tar.gz caelestia-shell-9c0223da60dac83fc8d0d9dc17b332882c986eb1.tar.bz2 caelestia-shell-9c0223da60dac83fc8d0d9dc17b332882c986eb1.zip | |
[typo] cpuTemp bad declaration (#151)
As the variable cpuTemp can now be used later in the if block for the fallback, need to change the declaration so that the variable is unique and used in two different blocks.
Const will redeclare it.. My bad on this
Diffstat (limited to 'services')
| -rw-r--r-- | services/SystemUsage.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/SystemUsage.qml b/services/SystemUsage.qml index d015d2f..7cdcace 100644 --- a/services/SystemUsage.qml +++ b/services/SystemUsage.qml @@ -160,10 +160,10 @@ Singleton { }) stdout: StdioCollector { onStreamFinished: { - const cpuTemp = text.match(/(?:Package id [0-9]+|Tdie):\s+((\+|-)[0-9.]+)(°| )C/); + let 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/); + cpuTemp = text.match(/Tctl:\s+((\+|-)[0-9.]+)(°| )C/); } if (cpuTemp) root.cpuTemp = parseFloat(cpuTemp[1]); |