pipewire service, lock-aware applets, cpu overall chart, security comments

This commit is contained in:
Damocles 2026-04-27 18:36:07 +02:00
parent e7bf175169
commit 8628b4b27b
13 changed files with 183 additions and 208 deletions

View file

@ -11,7 +11,6 @@ Column {
required property color accentColor
property bool active: true
property bool locked: false
property bool _coreActive: false
onActiveChanged: {
@ -141,36 +140,25 @@ Column {
}
}
// Overall CPU utilization chart
Item {
width: root.width
height: 44
Separator {}
Text {
id: _totalLabel
anchors.left: parent.left
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: S.SystemStats.cpuUsage + "%"
color: S.Theme.loadColor(S.SystemStats.cpuUsage)
font.pixelSize: S.Theme.fontSize - 1
font.family: S.Theme.fontFamily
font.bold: true
width: 32
}
// Overall CPU utilization
InfoRow {
label: "Total"
value: S.SystemStats.cpuUsage + "% @ " + S.SystemStats.cpuFreqGhz.toFixed(2) + " GHz"
valueColor: S.Theme.loadColor(S.SystemStats.cpuUsage)
}
SparklineCanvas {
anchors.left: _totalLabel.right
anchors.leftMargin: 6
anchors.right: parent.right
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
height: 32
history: root._cpuHistory
strokeColor: root.accentColor
colorAt: v => S.Theme.loadColor(v)
active: root.active
}
SparklineCanvas {
anchors.left: parent.left
anchors.leftMargin: 12
anchors.right: parent.right
anchors.rightMargin: 12
height: 32
history: root._cpuHistory
strokeColor: root.accentColor
colorAt: v => S.Theme.loadColor(v)
active: root.active
}
property var _cpuHistory: []
@ -184,72 +172,77 @@ Column {
}
}
Separator {}
Item {
// Process list - hidden on lock screen (exposes running process names)
Column {
visible: !S.LockService.locked
width: root.width
height: 18
Text {
anchors.left: parent.left
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: "PROCESS"
color: S.Theme.base03
font.pixelSize: S.Theme.fontSize - 3
font.family: S.Theme.fontFamily
font.letterSpacing: 1
}
Separator {}
Text {
anchors.right: parent.right
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: "CPU"
color: S.Theme.base03
font.pixelSize: S.Theme.fontSize - 3
font.family: S.Theme.fontFamily
font.letterSpacing: 1
}
}
// Top processes by CPU
Repeater {
model: root.processes
delegate: Item {
required property var modelData
width: root.width
height: 20
Item {
width: parent.width
height: 18
Text {
anchors.left: parent.left
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: modelData.cmd
color: S.Theme.base05
font.pixelSize: S.Theme.fontSize - 2
text: "PROCESS"
color: S.Theme.base03
font.pixelSize: S.Theme.fontSize - 3
font.family: S.Theme.fontFamily
elide: Text.ElideRight
width: parent.width - 80
font.letterSpacing: 1
}
Text {
anchors.right: parent.right
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: modelData.cpu.toFixed(1) + "%"
color: S.Theme.loadColor(modelData.cpu)
font.pixelSize: S.Theme.fontSize - 2
text: "CPU"
color: S.Theme.base03
font.pixelSize: S.Theme.fontSize - 3
font.family: S.Theme.fontFamily
width: 36
horizontalAlignment: Text.AlignRight
font.letterSpacing: 1
}
}
}
Item {
width: 1
height: 4
Repeater {
model: root.processes
delegate: Item {
required property var modelData
width: root.width
height: 20
Text {
anchors.left: parent.left
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: modelData.cmd
color: S.Theme.base05
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
elide: Text.ElideRight
width: parent.width - 80
}
Text {
anchors.right: parent.right
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: modelData.cpu.toFixed(1) + "%"
color: S.Theme.loadColor(modelData.cpu)
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
width: 36
horizontalAlignment: Text.AlignRight
}
}
}
Item {
width: 1
height: 4
}
}
}