nova-shell/shell/modules/GpuModule.qml

31 lines
780 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)
active: S.Modules.gpu.enable && S.SystemStats.gpuAvailable
tooltip: "GPU: " + S.SystemStats.gpuUsage + "%"
panelNamespace: "nova-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
}
}