better structure
This commit is contained in:
61
config/quickshell/Modules/Panel/Cards/SystemMonitorCard.qml
Normal file
61
config/quickshell/Modules/Panel/Cards/SystemMonitorCard.qml
Normal file
@@ -0,0 +1,61 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import qs.Constants
|
||||
import qs.Modules.Panel.Misc
|
||||
import qs.Noctalia
|
||||
import qs.Services
|
||||
import qs.Utils
|
||||
|
||||
// Unified system card: monitors CPU, temp, memory, disk
|
||||
NBox {
|
||||
id: root
|
||||
|
||||
compact: true
|
||||
|
||||
ColumnLayout {
|
||||
id: content
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginXS
|
||||
spacing: Style.marginS
|
||||
|
||||
MonitorSlider {
|
||||
icon: "cpu-usage"
|
||||
value: SystemStatService.cpuUsage
|
||||
from: 0
|
||||
to: 100
|
||||
colorFill: Colors.teal
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
MonitorSlider {
|
||||
icon: "memory"
|
||||
value: SystemStatService.memPercent
|
||||
from: 0
|
||||
to: 100
|
||||
colorFill: Colors.green
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
MonitorSlider {
|
||||
icon: "cpu-temperature"
|
||||
value: SystemStatService.cpuTemp
|
||||
from: 0
|
||||
to: 100
|
||||
colorFill: Colors.yellow
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
MonitorSlider {
|
||||
icon: "storage"
|
||||
value: SystemStatService.diskPercent
|
||||
from: 0
|
||||
to: 100
|
||||
colorFill: Colors.peach
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user