bar: warning for high resource usage

This commit is contained in:
end-4
2025-08-26 09:15:59 +07:00
parent 376f2bfeb1
commit 63b7a3a36c
6 changed files with 22 additions and 13 deletions
@@ -150,6 +150,9 @@ Singleton {
property JsonObject resources: JsonObject {
property bool alwaysShowSwap: true
property bool alwaysShowCpu: false
property int memoryWarningThreshold: 95
property int swapWarningThreshold: 85
property int cpuWarningThreshold: 90
}
property list<string> screenList: [] // List of names, like "eDP-1", find out with 'hyprctl monitors' command
property JsonObject utilButtons: JsonObject {
@@ -18,6 +18,7 @@ Item {
property bool enableAnimation: true
property int animationDuration: 800
property var easingType: Easing.OutCubic
property bool accountForLightBleeding: true
default property Item textMask: Item {
width: implicitSize
height: implicitSize
@@ -35,7 +36,7 @@ Item {
property real degree: value * 360
property real centerX: root.width / 2
property real centerY: root.height / 2
property real arcRadius: root.implicitSize / 2 - root.lineWidth / 2 - 0.5 // the 0.5 is to account for light bleeding
property real arcRadius: root.implicitSize / 2 - root.lineWidth / 2 - (0.5 * root.accountForLightBleeding)
property real startAngle: -90
Behavior on degree {