mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
@@ -139,7 +139,7 @@ Rectangle {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DgopService.distribution || "Linux"
|
||||
text: UserInfoService.hostname || "Linux"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceVariantText
|
||||
elide: Text.ElideRight
|
||||
|
||||
@@ -12,9 +12,9 @@ FocusScope {
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: 0
|
||||
anchors.rightMargin: Theme.spacingS
|
||||
anchors.bottomMargin: Theme.spacingM
|
||||
anchors.leftMargin: Theme.spacingS
|
||||
anchors.rightMargin: 0
|
||||
anchors.bottomMargin: 0
|
||||
anchors.topMargin: 0
|
||||
color: "transparent"
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ Rectangle {
|
||||
Column {
|
||||
id: sidebarColumn
|
||||
|
||||
width: parent.width
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Theme.spacingS
|
||||
anchors.rightMargin: Theme.spacingS
|
||||
anchors.bottomMargin: Theme.spacingS
|
||||
@@ -100,7 +100,7 @@ Rectangle {
|
||||
|
||||
property bool isActive: sidebarContainer.currentIndex === index
|
||||
|
||||
width: sidebarColumn.width - Theme.spacingS * 2
|
||||
width: parent.width
|
||||
height: 44
|
||||
radius: Theme.cornerRadius
|
||||
color: isActive ? Theme.primary : tabMouseArea.containsMouse ? Theme.surfaceHover : "transparent"
|
||||
|
||||
@@ -9,10 +9,10 @@ DankFlickable {
|
||||
contentHeight: systemColumn.implicitHeight
|
||||
clip: true
|
||||
Component.onCompleted: {
|
||||
DgopService.addRef(["system", "hardware", "diskmounts"]);
|
||||
DgopService.addRef(["system", "diskmounts"]);
|
||||
}
|
||||
Component.onDestruction: {
|
||||
DgopService.removeRef(["system", "hardware", "diskmounts"]);
|
||||
DgopService.removeRef(["system", "diskmounts"]);
|
||||
}
|
||||
|
||||
Column {
|
||||
|
||||
@@ -75,7 +75,6 @@ Item {
|
||||
|
||||
DankFlickable {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Theme.spacingL
|
||||
clip: true
|
||||
contentHeight: mainColumn.height
|
||||
contentWidth: width
|
||||
|
||||
@@ -736,8 +736,6 @@ Item {
|
||||
|
||||
DankFlickable {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Theme.spacingL
|
||||
anchors.bottomMargin: Theme.spacingS
|
||||
clip: true
|
||||
contentHeight: mainColumn.height
|
||||
contentWidth: width
|
||||
|
||||
@@ -75,8 +75,6 @@ Item {
|
||||
|
||||
DankFlickable {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Theme.spacingL
|
||||
anchors.bottomMargin: Theme.spacingS
|
||||
clip: true
|
||||
contentHeight: mainColumn.height
|
||||
contentWidth: width
|
||||
|
||||
@@ -10,7 +10,6 @@ Item {
|
||||
|
||||
DankFlickable {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Theme.spacingL
|
||||
clip: true
|
||||
contentHeight: mainColumn.height
|
||||
contentWidth: width
|
||||
|
||||
@@ -24,7 +24,6 @@ Item {
|
||||
|
||||
DankFlickable {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Theme.spacingL
|
||||
clip: true
|
||||
contentHeight: mainColumn.height
|
||||
contentWidth: width
|
||||
|
||||
@@ -68,7 +68,6 @@ Item {
|
||||
|
||||
DankFlickable {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Theme.spacingL
|
||||
clip: true
|
||||
contentHeight: mainColumn.height
|
||||
contentWidth: width
|
||||
|
||||
@@ -19,7 +19,6 @@ FocusScope {
|
||||
|
||||
DankFlickable {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Theme.spacingL
|
||||
clip: true
|
||||
contentHeight: mainColumn.height
|
||||
contentWidth: width
|
||||
|
||||
@@ -64,7 +64,6 @@ Item {
|
||||
|
||||
DankFlickable {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Theme.spacingL
|
||||
clip: true
|
||||
contentHeight: mainColumn.height
|
||||
contentWidth: width
|
||||
|
||||
@@ -11,7 +11,6 @@ Item {
|
||||
|
||||
DankFlickable {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Theme.spacingL
|
||||
clip: true
|
||||
contentHeight: mainColumn.height
|
||||
contentWidth: width
|
||||
|
||||
@@ -9,7 +9,6 @@ Item {
|
||||
|
||||
DankFlickable {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Theme.spacingL
|
||||
clip: true
|
||||
contentHeight: mainColumn.height
|
||||
contentWidth: width
|
||||
|
||||
@@ -228,10 +228,15 @@ Singleton {
|
||||
function initializeGpuMetadata() {
|
||||
if (!dgopAvailable)
|
||||
return
|
||||
// Load GPU metadata once at startup for basic info
|
||||
gpuInitProcess.running = true
|
||||
}
|
||||
|
||||
function initializeSystemMetadata() {
|
||||
if (!dgopAvailable)
|
||||
return
|
||||
systemInitProcess.running = true
|
||||
}
|
||||
|
||||
function buildDgopCommand() {
|
||||
const cmd = ["dgop", "meta", "--json"]
|
||||
|
||||
@@ -450,14 +455,14 @@ Singleton {
|
||||
bootTime = sys.boottime || ""
|
||||
}
|
||||
|
||||
if (data.hardware) {
|
||||
const hw = data.hardware
|
||||
hostname = hw.hostname || ""
|
||||
kernelVersion = hw.kernel || ""
|
||||
distribution = hw.distro || ""
|
||||
architecture = hw.arch || ""
|
||||
motherboard = (hw.bios && hw.bios.motherboard) || ""
|
||||
biosVersion = (hw.bios && hw.bios.version) || ""
|
||||
const hwData = data.hardware || (data.hostname || data.kernel || data.distro || data.arch) ? data : null
|
||||
if (hwData) {
|
||||
hostname = hwData.hostname || ""
|
||||
kernelVersion = hwData.kernel || ""
|
||||
distribution = hwData.distro || ""
|
||||
architecture = hwData.arch || ""
|
||||
motherboard = (hwData.bios && hwData.bios.motherboard) || ""
|
||||
biosVersion = (hwData.bios && hwData.bios.version) || ""
|
||||
}
|
||||
|
||||
isUpdating = false
|
||||
@@ -629,6 +634,29 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
Process {
|
||||
id: systemInitProcess
|
||||
command: ["dgop", "hardware", "--json"]
|
||||
running: false
|
||||
onExited: exitCode => {
|
||||
if (exitCode !== 0) {
|
||||
console.warn("System init process failed with exit code:", exitCode)
|
||||
}
|
||||
}
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (text.trim()) {
|
||||
try {
|
||||
const data = JSON.parse(text.trim())
|
||||
parseData(data)
|
||||
} catch (e) {
|
||||
console.warn("Failed to parse system init JSON:", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Process {
|
||||
id: dgopCheckProcess
|
||||
command: ["which", "dgop"]
|
||||
@@ -637,12 +665,11 @@ Singleton {
|
||||
dgopAvailable = (exitCode === 0)
|
||||
if (dgopAvailable) {
|
||||
initializeGpuMetadata()
|
||||
// Load persisted GPU PCI IDs from session state
|
||||
initializeSystemMetadata()
|
||||
if (SessionData.enabledGpuPciIds && SessionData.enabledGpuPciIds.length > 0) {
|
||||
for (const pciId of SessionData.enabledGpuPciIds) {
|
||||
addGpuPciId(pciId)
|
||||
}
|
||||
// Trigger update if we already have active modules
|
||||
if (refCount > 0 && enabledModules.length > 0) {
|
||||
updateAllStats()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user