1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

separate static sysinfo call

This commit is contained in:
bbedward
2025-08-08 20:44:25 -04:00
parent 0a22565cbd
commit f973f1b16c
2 changed files with 291 additions and 235 deletions

View File

@@ -284,13 +284,21 @@ ScrollView {
text: {
if (!SysMonitorService.availableGpus
|| SysMonitorService.availableGpus.length === 0) {
return "Vendor: N/A"
return "Nadda"
}
var gpu = SysMonitorService.availableGpus[Math.min(
SessionData.selectedGpuIndex,
SysMonitorService.availableGpus.length
- 1)]
return "Vendor: " + gpu.vendor
var vendor = gpu.vendor.toLowerCase()
if (vendor.includes("nvidia")) {
return "<font color='" + Theme.success + "'>The green company</font>"
} else if (vendor.includes("amd")) {
return "<font color='" + Theme.error + "'>The red company</font>"
} else if (vendor.includes("intel")) {
return "<font color='" + Theme.info + "'>The blue company</font>"
}
return gpu.vendor
}
font.pixelSize: Theme.fontSizeSmall
font.family: SettingsData.monoFontFamily
@@ -299,6 +307,7 @@ ScrollView {
width: parent.width
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
textFormat: Text.RichText
}
StyledText {