diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-15 19:19:47 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-15 19:20:14 +0800 |
| commit | f7e4b82cf17a6571e3cca8bc57cd20a28bbe3ea8 (patch) | |
| tree | f81885d6fc5e9c2095e5d277097fdd21e1bd687c /bar/Resources.qml | |
| parent | c549a8a57aedde017dfd7c8ea53348d789c95fa7 (diff) | |
stats: highlight significant usages
Diffstat (limited to 'bar/Resources.qml')
| -rw-r--r-- | bar/Resources.qml | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/bar/Resources.qml b/bar/Resources.qml index d66fed6..3e393e4 100644 --- a/bar/Resources.qml +++ b/bar/Resources.qml @@ -21,20 +21,30 @@ Item { id: layout anchors.centerIn: parent SimpleResource { - text: Math.round(Services.Resource.cpuUsage * 100) + "%" + value: Services.Resource.cpuUsage + suffix: "%" icon: Config.Icons.resource.cpu } SimpleResource { icon: Config.Icons.resource.memory - text: Math.round(Services.Resource.memoryUsedPercentage * 100) + "%" + value: Services.Resource.memoryUsedPercentage + suffix: "%" } SimpleResource { icon: Config.Icons.resource.gpu - text: Services.Resource.gpuUsage + "%" + value: Services.Resource.gpuUsage / 100 + suffix: "%" + thresholdL1: 0.60 + thresholdL2: 0.70 + thresholdL3: 0.80 } SimpleResource { icon: Config.Icons.resource.temp - text: Math.round(Services.Resource.cpuTemp * 100) + "°C" + value: Services.Resource.cpuTemp + suffix: "°C" + thresholdL1: 0.60 + thresholdL2: 0.80 + thresholdL3: 0.90 } } } |
