32 lines
803 B
QML
32 lines
803 B
QML
import QtQuick
|
|
import Quickshell
|
|
import "." as M
|
|
import "../services" as S
|
|
import "../applets" as C
|
|
|
|
M.BarModule {
|
|
id: root
|
|
spacing: Math.max(1, S.Theme.moduleSpacing - 2)
|
|
visible: S.Modules.gpu.enable && S.SystemStats.gpuAvailable
|
|
tooltip: "GPU: " + S.SystemStats.gpuUsage + "%"
|
|
panelNamespace: "nova-gpu"
|
|
panelTitle: "GPU"
|
|
panelContentWidth: 240
|
|
panelComponent: Component {
|
|
C.GpuApplet {
|
|
width: parent.width
|
|
active: root._showPanel
|
|
accentColor: root.accentColor
|
|
}
|
|
}
|
|
|
|
M.BarIcon {
|
|
icon: "\uEB4C"
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
M.BarLabel {
|
|
label: S.SystemStats.gpuUsage + "%"
|
|
minText: "100%"
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
}
|