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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user