mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2026-09-19 10:19:02 +05:30
feat(gpu): add cardwire integration and gpu widget
This commit is contained in:
23
modules/bar/GPUWidget.qml
Normal file
23
modules/bar/GPUWidget.qml
Normal file
@@ -0,0 +1,23 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import Quickshell
|
||||
import qs.config
|
||||
import qs.ui
|
||||
import qs.services
|
||||
|
||||
BarButton {
|
||||
id: root
|
||||
|
||||
hoverHighlight: false
|
||||
pointerCursor: false
|
||||
iconSource: GPU.icon
|
||||
|
||||
visible: GPU.connected && GPU.gpu !== null
|
||||
opacity: GPU.gpu !== null && GPU.gpu.known ? 1 : 0
|
||||
|
||||
label: {
|
||||
if (!GPU.gpu)
|
||||
return "NA";
|
||||
return GPU.gpu.blocked ? "Blocked" : "Active";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user