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

dgop was rebranded

This commit is contained in:
bbedward
2025-08-10 22:21:54 -04:00
parent 5b259db341
commit 9bc5de8a8a
17 changed files with 259 additions and 259 deletions

View File

@@ -11,7 +11,7 @@ Singleton {
property int refCount: 0
property int updateInterval: refCount > 0 ? 3000 : 30000
property bool isUpdating: false
property bool dankgopAvailable: false
property bool dgopAvailable: false
property var moduleRefCounts: ({})
property var enabledModules: []
@@ -205,22 +205,22 @@ Singleton {
}
function updateAllStats() {
if (dankgopAvailable && refCount > 0 && enabledModules.length > 0) {
if (dgopAvailable && refCount > 0 && enabledModules.length > 0) {
isUpdating = true
dankgopProcess.running = true
dgopProcess.running = true
} else {
isUpdating = false
}
}
function initializeGpuMetadata() {
if (!dankgopAvailable) return
if (!dgopAvailable) return
// Load GPU metadata once at startup for basic info
gpuInitProcess.running = true
}
function buildDankgopCommand() {
const cmd = ["dankgop", "meta", "--json"]
function buildDgopCommand() {
const cmd = ["dgop", "meta", "--json"]
if (enabledModules.length === 0) {
// Don't run if no modules are needed
@@ -281,7 +281,7 @@ Singleton {
const cpu = data.cpu
cpuSampleCount++
// Use dankgop CPU numbers directly without modification
// Use dgop CPU numbers directly without modification
cpuUsage = cpu.usage || 0
cpuFrequency = cpu.frequency || 0
cpuTemperature = cpu.temperature || 0
@@ -516,22 +516,22 @@ Singleton {
Timer {
id: updateTimer
interval: root.updateInterval
running: root.dankgopAvailable && root.refCount > 0 && root.enabledModules.length > 0
running: root.dgopAvailable && root.refCount > 0 && root.enabledModules.length > 0
repeat: true
triggeredOnStart: true
onTriggered: root.updateAllStats()
}
Process {
id: dankgopProcess
command: root.buildDankgopCommand()
id: dgopProcess
command: root.buildDgopCommand()
running: false
onCommandChanged: {
//console.log("DankgopService command:", JSON.stringify(command))
//console.log("DgopService command:", JSON.stringify(command))
}
onExited: exitCode => {
if (exitCode !== 0) {
console.warn("Dankgop process failed with exit code:", exitCode)
console.warn("Dgop process failed with exit code:", exitCode)
isUpdating = false
}
}
@@ -542,7 +542,7 @@ Singleton {
const data = JSON.parse(text.trim())
parseData(data)
} catch (e) {
console.warn("Failed to parse dankgop JSON:", e)
console.warn("Failed to parse dgop JSON:", e)
console.warn("Raw text was:", text.substring(0, 200))
isUpdating = false
}
@@ -553,7 +553,7 @@ Singleton {
Process {
id: gpuInitProcess
command: ["dankgop", "gpu", "--json"]
command: ["dgop", "gpu", "--json"]
running: false
onExited: exitCode => {
if (exitCode !== 0) {
@@ -575,12 +575,12 @@ Singleton {
}
Process {
id: dankgopCheckProcess
command: ["which", "dankgop"]
id: dgopCheckProcess
command: ["which", "dgop"]
running: false
onExited: exitCode => {
dankgopAvailable = (exitCode === 0)
if (dankgopAvailable) {
dgopAvailable = (exitCode === 0)
if (dgopAvailable) {
initializeGpuMetadata()
// Load persisted GPU PCI IDs from session state
if (SessionData.enabledGpuPciIds && SessionData.enabledGpuPciIds.length > 0) {
@@ -593,12 +593,12 @@ Singleton {
}
}
} else {
console.warn("dankgop is not installed or not in PATH")
console.warn("dgop is not installed or not in PATH")
}
}
}
Component.onCompleted: {
dankgopCheckProcess.running = true
dgopCheckProcess.running = true
}
}