1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 21:45:38 -05:00

feat: add temperature widgets, separate ram/cpu widgets, update

calculations
- make CPU calculations per-process mirror gnome (of all CPUs)
This commit is contained in:
bbedward
2025-08-08 14:43:43 -04:00
parent 105353c2a4
commit 03276b7d9a
27 changed files with 794 additions and 254 deletions

View File

@@ -57,10 +57,10 @@ Rectangle {
size: Theme.iconSize - 8
color: {
if (SysMonitorService.cpuUsage > 80)
return Theme.error;
return Theme.tempDanger;
if (SysMonitorService.cpuUsage > 60)
return Theme.warning;
return Theme.tempWarning;
return Theme.surfaceText;
}
@@ -68,7 +68,12 @@ Rectangle {
}
StyledText {
text: (SysMonitorService.cpuUsage || 0).toFixed(0) + "%"
text: {
if (SysMonitorService.cpuUsage === undefined || SysMonitorService.cpuUsage === null || SysMonitorService.cpuUsage === 0) {
return "--%";
}
return SysMonitorService.cpuUsage.toFixed(0) + "%";
}
font.pixelSize: Theme.fontSizeSmall
font.weight: Font.Medium
color: Theme.surfaceText