Files
z-bar-qt/Modules/Resources.qml
T
Zacharias-Brohn d56a0260fb formatter
2026-02-24 23:20:11 +01:00

97 lines
1.8 KiB
QML

pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import QtQuick.Layouts
import Quickshell.Wayland
import qs.Modules
import qs.Config
import qs.Effects
import qs.Components
Item {
id: root
clip: true
implicitHeight: 34
implicitWidth: rowLayout.implicitWidth + rowLayout.anchors.leftMargin + rowLayout.anchors.rightMargin
Rectangle {
id: backgroundRect
color: DynamicColors.tPalette.m3surfaceContainer
implicitHeight: 22
radius: height / 2
Behavior on color {
CAnim {
}
}
anchors {
left: parent.left
right: parent.right
verticalCenter: parent.verticalCenter
}
RowLayout {
id: rowLayout
anchors.fill: parent
anchors.leftMargin: 5
anchors.rightMargin: 5
spacing: 6
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
color: DynamicColors.palette.m3onSurface
font.pixelSize: 18
text: "memory_alt"
}
Resource {
mainColor: DynamicColors.palette.m3primary
percentage: ResourceUsage.memoryUsedPercentage
warningThreshold: 95
}
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
color: DynamicColors.palette.m3onSurface
font.pixelSize: 18
text: "memory"
}
Resource {
mainColor: DynamicColors.palette.m3secondary
percentage: ResourceUsage.cpuUsage
warningThreshold: 80
}
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
color: DynamicColors.palette.m3onSurface
font.pixelSize: 18
text: "gamepad"
}
Resource {
mainColor: DynamicColors.palette.m3tertiary
percentage: ResourceUsage.gpuUsage
}
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
color: DynamicColors.palette.m3onSurface
font.pixelSize: 18
text: "developer_board"
}
Resource {
mainColor: DynamicColors.palette.m3primary
percentage: ResourceUsage.gpuMemUsage
}
}
}
}