mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-25 05:52:50 -05:00
dgop was rebranded
This commit is contained in:
@@ -28,10 +28,10 @@ Column {
|
||||
anchors.fill: parent
|
||||
spacing: Theme.spacingM
|
||||
Component.onCompleted: {
|
||||
DankgopService.addRef(["cpu", "memory", "network", "disk"])
|
||||
DgopService.addRef(["cpu", "memory", "network", "disk"])
|
||||
}
|
||||
Component.onDestruction: {
|
||||
DankgopService.removeRef(["cpu", "memory", "network", "disk"])
|
||||
DgopService.removeRef(["cpu", "memory", "network", "disk"])
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@@ -71,7 +71,7 @@ Column {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.cpuUsage.toFixed(1) + "%"
|
||||
text: DgopService.cpuUsage.toFixed(1) + "%"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
color: Theme.primary
|
||||
@@ -85,7 +85,7 @@ Column {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.cpuCores + " cores"
|
||||
text: DgopService.cpuCores + " cores"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceVariantText
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -104,7 +104,7 @@ Column {
|
||||
spacing: 6
|
||||
|
||||
Repeater {
|
||||
model: DankgopService.perCoreCpuUsage
|
||||
model: DgopService.perCoreCpuUsage
|
||||
|
||||
Row {
|
||||
width: parent.width
|
||||
@@ -193,9 +193,9 @@ Column {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.formatSystemMemory(
|
||||
DankgopService.usedMemoryKB) + " / " + DankgopService.formatSystemMemory(
|
||||
DankgopService.totalMemoryKB)
|
||||
text: DgopService.formatSystemMemory(
|
||||
DgopService.usedMemoryKB) + " / " + DgopService.formatSystemMemory(
|
||||
DgopService.totalMemoryKB)
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceVariantText
|
||||
}
|
||||
@@ -218,15 +218,15 @@ Column {
|
||||
color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2)
|
||||
|
||||
Rectangle {
|
||||
width: DankgopService.totalMemoryKB
|
||||
> 0 ? parent.width * (DankgopService.usedMemoryKB
|
||||
/ DankgopService.totalMemoryKB) : 0
|
||||
width: DgopService.totalMemoryKB
|
||||
> 0 ? parent.width * (DgopService.usedMemoryKB
|
||||
/ DgopService.totalMemoryKB) : 0
|
||||
height: parent.height
|
||||
radius: parent.radius
|
||||
color: {
|
||||
const usage = DankgopService.totalMemoryKB
|
||||
> 0 ? (DankgopService.usedMemoryKB
|
||||
/ DankgopService.totalMemoryKB) : 0
|
||||
const usage = DgopService.totalMemoryKB
|
||||
> 0 ? (DgopService.usedMemoryKB
|
||||
/ DgopService.totalMemoryKB) : 0
|
||||
if (usage > 0.9)
|
||||
return Theme.error
|
||||
|
||||
@@ -245,9 +245,9 @@ Column {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.totalMemoryKB
|
||||
> 0 ? ((DankgopService.usedMemoryKB
|
||||
/ DankgopService.totalMemoryKB) * 100).toFixed(
|
||||
text: DgopService.totalMemoryKB
|
||||
> 0 ? ((DgopService.usedMemoryKB
|
||||
/ DgopService.totalMemoryKB) * 100).toFixed(
|
||||
1) + "% used" : "No data"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
@@ -272,11 +272,11 @@ Column {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.totalSwapKB
|
||||
> 0 ? DankgopService.formatSystemMemory(
|
||||
DankgopService.usedSwapKB) + " / "
|
||||
+ DankgopService.formatSystemMemory(
|
||||
DankgopService.totalSwapKB) : "No swap configured"
|
||||
text: DgopService.totalSwapKB
|
||||
> 0 ? DgopService.formatSystemMemory(
|
||||
DgopService.usedSwapKB) + " / "
|
||||
+ DgopService.formatSystemMemory(
|
||||
DgopService.totalSwapKB) : "No swap configured"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceVariantText
|
||||
}
|
||||
@@ -299,17 +299,17 @@ Column {
|
||||
color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2)
|
||||
|
||||
Rectangle {
|
||||
width: DankgopService.totalSwapKB
|
||||
> 0 ? parent.width * (DankgopService.usedSwapKB
|
||||
/ DankgopService.totalSwapKB) : 0
|
||||
width: DgopService.totalSwapKB
|
||||
> 0 ? parent.width * (DgopService.usedSwapKB
|
||||
/ DgopService.totalSwapKB) : 0
|
||||
height: parent.height
|
||||
radius: parent.radius
|
||||
color: {
|
||||
if (!DankgopService.totalSwapKB)
|
||||
if (!DgopService.totalSwapKB)
|
||||
return Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g,
|
||||
Theme.surfaceText.b, 0.3)
|
||||
|
||||
const usage = DankgopService.usedSwapKB / DankgopService.totalSwapKB
|
||||
const usage = DgopService.usedSwapKB / DgopService.totalSwapKB
|
||||
if (usage > 0.9)
|
||||
return Theme.error
|
||||
|
||||
@@ -328,9 +328,9 @@ Column {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.totalSwapKB
|
||||
> 0 ? ((DankgopService.usedSwapKB
|
||||
/ DankgopService.totalSwapKB) * 100).toFixed(
|
||||
text: DgopService.totalSwapKB
|
||||
> 0 ? ((DgopService.usedSwapKB
|
||||
/ DgopService.totalSwapKB) * 100).toFixed(
|
||||
1) + "% used" : "Not available"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
@@ -381,9 +381,9 @@ Column {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.networkRxRate
|
||||
text: DgopService.networkRxRate
|
||||
> 0 ? formatNetworkSpeed(
|
||||
DankgopService.networkRxRate) : "0 B/s"
|
||||
DgopService.networkRxRate) : "0 B/s"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
color: Theme.surfaceText
|
||||
@@ -400,9 +400,9 @@ Column {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.networkTxRate
|
||||
text: DgopService.networkTxRate
|
||||
> 0 ? formatNetworkSpeed(
|
||||
DankgopService.networkTxRate) : "0 B/s"
|
||||
DgopService.networkTxRate) : "0 B/s"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
color: Theme.surfaceText
|
||||
@@ -448,7 +448,7 @@ Column {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: formatDiskSpeed(DankgopService.diskReadRate)
|
||||
text: formatDiskSpeed(DgopService.diskReadRate)
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
color: Theme.surfaceText
|
||||
@@ -465,7 +465,7 @@ Column {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: formatDiskSpeed(DankgopService.diskWriteRate)
|
||||
text: formatDiskSpeed(DgopService.diskWriteRate)
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
color: Theme.surfaceText
|
||||
|
||||
@@ -59,7 +59,7 @@ Rectangle {
|
||||
DankIcon {
|
||||
id: processIcon
|
||||
|
||||
name: DankgopService.getProcessIcon(process ? process.command : "")
|
||||
name: DgopService.getProcessIcon(process ? process.command : "")
|
||||
size: Theme.iconSize - 4
|
||||
color: {
|
||||
if (process && process.cpu > 80)
|
||||
@@ -110,7 +110,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.formatCpuUsage(process ? process.cpu : 0)
|
||||
text: DgopService.formatCpuUsage(process ? process.cpu : 0)
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: SettingsData.monoFontFamily
|
||||
font.weight: Font.Bold
|
||||
@@ -149,7 +149,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.formatMemoryUsage(
|
||||
text: DgopService.formatMemoryUsage(
|
||||
process ? process.memoryKB : 0)
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: SettingsData.monoFontFamily
|
||||
|
||||
@@ -57,7 +57,7 @@ PanelWindow {
|
||||
color: "transparent"
|
||||
|
||||
Ref {
|
||||
service: DankgopService
|
||||
service: DgopService
|
||||
}
|
||||
|
||||
anchors {
|
||||
|
||||
@@ -10,10 +10,10 @@ Column {
|
||||
property var contextMenu: null
|
||||
|
||||
Component.onCompleted: {
|
||||
DankgopService.addRef(["processes"])
|
||||
DgopService.addRef(["processes"])
|
||||
}
|
||||
Component.onDestruction: {
|
||||
DankgopService.removeRef(["processes"])
|
||||
DgopService.removeRef(["processes"])
|
||||
}
|
||||
|
||||
Item {
|
||||
@@ -39,9 +39,9 @@ Column {
|
||||
text: "Process"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: SettingsData.monoFontFamily
|
||||
font.weight: DankgopService.sortBy === "name" ? Font.Bold : Font.Medium
|
||||
font.weight: DgopService.sortBy === "name" ? Font.Bold : Font.Medium
|
||||
color: Theme.surfaceText
|
||||
opacity: DankgopService.sortBy === "name" ? 1 : 0.7
|
||||
opacity: DgopService.sortBy === "name" ? 1 : 0.7
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ Column {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
DankgopService.setSortBy("name")
|
||||
DgopService.setSortBy("name")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,9 +79,9 @@ Column {
|
||||
text: "CPU"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: SettingsData.monoFontFamily
|
||||
font.weight: DankgopService.sortBy === "cpu" ? Font.Bold : Font.Medium
|
||||
font.weight: DgopService.sortBy === "cpu" ? Font.Bold : Font.Medium
|
||||
color: Theme.surfaceText
|
||||
opacity: DankgopService.sortBy === "cpu" ? 1 : 0.7
|
||||
opacity: DgopService.sortBy === "cpu" ? 1 : 0.7
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ Column {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
DankgopService.setSortBy("cpu")
|
||||
DgopService.setSortBy("cpu")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,9 +119,9 @@ Column {
|
||||
text: "RAM"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: SettingsData.monoFontFamily
|
||||
font.weight: DankgopService.sortBy === "memory" ? Font.Bold : Font.Medium
|
||||
font.weight: DgopService.sortBy === "memory" ? Font.Bold : Font.Medium
|
||||
color: Theme.surfaceText
|
||||
opacity: DankgopService.sortBy === "memory" ? 1 : 0.7
|
||||
opacity: DgopService.sortBy === "memory" ? 1 : 0.7
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ Column {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
DankgopService.setSortBy("memory")
|
||||
DgopService.setSortBy("memory")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,9 +159,9 @@ Column {
|
||||
text: "PID"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: SettingsData.monoFontFamily
|
||||
font.weight: DankgopService.sortBy === "pid" ? Font.Bold : Font.Medium
|
||||
font.weight: DgopService.sortBy === "pid" ? Font.Bold : Font.Medium
|
||||
color: Theme.surfaceText
|
||||
opacity: DankgopService.sortBy === "pid" ? 1 : 0.7
|
||||
opacity: DgopService.sortBy === "pid" ? 1 : 0.7
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
@@ -173,7 +173,7 @@ Column {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
DankgopService.setSortBy("pid")
|
||||
DgopService.setSortBy("pid")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ Column {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.sortDescending ? "↓" : "↑"
|
||||
text: DgopService.sortDescending ? "↓" : "↑"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceText
|
||||
anchors.centerIn: parent
|
||||
@@ -210,7 +210,7 @@ Column {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
// ! TODO - we lost this with dankgop
|
||||
// ! TODO - we lost this with dgop
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ Column {
|
||||
height: parent.height - columnHeaders.height
|
||||
clip: true
|
||||
spacing: 4
|
||||
model: DankgopService.processes
|
||||
model: DgopService.processes
|
||||
|
||||
delegate: ProcessListItem {
|
||||
process: modelData
|
||||
|
||||
@@ -8,10 +8,10 @@ Row {
|
||||
width: parent.width
|
||||
spacing: Theme.spacingM
|
||||
Component.onCompleted: {
|
||||
DankgopService.addRef(["cpu", "memory", "system"]);
|
||||
DgopService.addRef(["cpu", "memory", "system"]);
|
||||
}
|
||||
Component.onDestruction: {
|
||||
DankgopService.removeRef(["cpu", "memory", "system"]);
|
||||
DgopService.removeRef(["cpu", "memory", "system"]);
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@@ -19,15 +19,15 @@ Row {
|
||||
height: 80
|
||||
radius: Theme.cornerRadius
|
||||
color: {
|
||||
if (DankgopService.sortBy === "cpu")
|
||||
if (DgopService.sortBy === "cpu")
|
||||
return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.16);
|
||||
else if (cpuCardMouseArea.containsMouse)
|
||||
return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12);
|
||||
else
|
||||
return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08);
|
||||
}
|
||||
border.color: DankgopService.sortBy === "cpu" ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.4) : Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2)
|
||||
border.width: DankgopService.sortBy === "cpu" ? 2 : 1
|
||||
border.color: DgopService.sortBy === "cpu" ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.4) : Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2)
|
||||
border.width: DgopService.sortBy === "cpu" ? 2 : 1
|
||||
|
||||
MouseArea {
|
||||
id: cpuCardMouseArea
|
||||
@@ -35,7 +35,7 @@ Row {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: DankgopService.setSortBy("cpu")
|
||||
onClicked: DgopService.setSortBy("cpu")
|
||||
}
|
||||
|
||||
Column {
|
||||
@@ -48,8 +48,8 @@ Row {
|
||||
text: "CPU"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Medium
|
||||
color: DankgopService.sortBy === "cpu" ? Theme.primary : Theme.secondary
|
||||
opacity: DankgopService.sortBy === "cpu" ? 1 : 0.8
|
||||
color: DgopService.sortBy === "cpu" ? Theme.primary : Theme.secondary
|
||||
opacity: DgopService.sortBy === "cpu" ? 1 : 0.8
|
||||
}
|
||||
|
||||
Row {
|
||||
@@ -57,9 +57,9 @@ Row {
|
||||
|
||||
StyledText {
|
||||
text: {
|
||||
if (DankgopService.cpuUsage === undefined || DankgopService.cpuUsage === null)
|
||||
if (DgopService.cpuUsage === undefined || DgopService.cpuUsage === null)
|
||||
return "--%"
|
||||
return DankgopService.cpuUsage.toFixed(1) + "%"
|
||||
return DgopService.cpuUsage.toFixed(1) + "%"
|
||||
}
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
font.family: SettingsData.monoFontFamily
|
||||
@@ -77,19 +77,19 @@ Row {
|
||||
|
||||
StyledText {
|
||||
text: {
|
||||
if (DankgopService.cpuTemperature === undefined || DankgopService.cpuTemperature === null || DankgopService.cpuTemperature <= 0)
|
||||
if (DgopService.cpuTemperature === undefined || DgopService.cpuTemperature === null || DgopService.cpuTemperature <= 0)
|
||||
return "--°";
|
||||
|
||||
return Math.round(DankgopService.cpuTemperature) + "°";
|
||||
return Math.round(DgopService.cpuTemperature) + "°";
|
||||
}
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.family: SettingsData.monoFontFamily
|
||||
font.weight: Font.Medium
|
||||
color: {
|
||||
if (DankgopService.cpuTemperature > 80)
|
||||
if (DgopService.cpuTemperature > 80)
|
||||
return Theme.error;
|
||||
|
||||
if (DankgopService.cpuTemperature > 60)
|
||||
if (DgopService.cpuTemperature > 60)
|
||||
return Theme.warning;
|
||||
|
||||
return Theme.surfaceText;
|
||||
@@ -100,7 +100,7 @@ Row {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.cpuCores + " cores"
|
||||
text: DgopService.cpuCores + " cores"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: SettingsData.monoFontFamily
|
||||
color: Theme.surfaceText
|
||||
@@ -130,15 +130,15 @@ Row {
|
||||
height: 80
|
||||
radius: Theme.cornerRadius
|
||||
color: {
|
||||
if (DankgopService.sortBy === "memory")
|
||||
if (DgopService.sortBy === "memory")
|
||||
return Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.16);
|
||||
else if (memoryCardMouseArea.containsMouse)
|
||||
return Qt.rgba(Theme.secondary.r, Theme.secondary.g, Theme.secondary.b, 0.12);
|
||||
else
|
||||
return Qt.rgba(Theme.secondary.r, Theme.secondary.g, Theme.secondary.b, 0.08);
|
||||
}
|
||||
border.color: DankgopService.sortBy === "memory" ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.4) : Qt.rgba(Theme.secondary.r, Theme.secondary.g, Theme.secondary.b, 0.2)
|
||||
border.width: DankgopService.sortBy === "memory" ? 2 : 1
|
||||
border.color: DgopService.sortBy === "memory" ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.4) : Qt.rgba(Theme.secondary.r, Theme.secondary.g, Theme.secondary.b, 0.2)
|
||||
border.width: DgopService.sortBy === "memory" ? 2 : 1
|
||||
|
||||
MouseArea {
|
||||
id: memoryCardMouseArea
|
||||
@@ -146,7 +146,7 @@ Row {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: DankgopService.setSortBy("memory")
|
||||
onClicked: DgopService.setSortBy("memory")
|
||||
}
|
||||
|
||||
Column {
|
||||
@@ -159,15 +159,15 @@ Row {
|
||||
text: "Memory"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Medium
|
||||
color: DankgopService.sortBy === "memory" ? Theme.primary : Theme.secondary
|
||||
opacity: DankgopService.sortBy === "memory" ? 1 : 0.8
|
||||
color: DgopService.sortBy === "memory" ? Theme.primary : Theme.secondary
|
||||
opacity: DgopService.sortBy === "memory" ? 1 : 0.8
|
||||
}
|
||||
|
||||
Row {
|
||||
spacing: Theme.spacingS
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.formatSystemMemory(DankgopService.usedMemoryKB)
|
||||
text: DgopService.formatSystemMemory(DgopService.usedMemoryKB)
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
font.family: SettingsData.monoFontFamily
|
||||
font.weight: Font.Bold
|
||||
@@ -180,27 +180,27 @@ Row {
|
||||
height: 20
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.3)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: DankgopService.totalSwapKB > 0
|
||||
visible: DgopService.totalSwapKB > 0
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.totalSwapKB > 0 ? DankgopService.formatSystemMemory(DankgopService.usedSwapKB) : ""
|
||||
text: DgopService.totalSwapKB > 0 ? DgopService.formatSystemMemory(DgopService.usedSwapKB) : ""
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.family: SettingsData.monoFontFamily
|
||||
font.weight: Font.Medium
|
||||
color: DankgopService.usedSwapKB > 0 ? Theme.warning : Theme.surfaceText
|
||||
color: DgopService.usedSwapKB > 0 ? Theme.warning : Theme.surfaceText
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: DankgopService.totalSwapKB > 0
|
||||
visible: DgopService.totalSwapKB > 0
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: {
|
||||
if (DankgopService.totalSwapKB > 0)
|
||||
return "of " + DankgopService.formatSystemMemory(DankgopService.totalMemoryKB) + " + swap";
|
||||
if (DgopService.totalSwapKB > 0)
|
||||
return "of " + DgopService.formatSystemMemory(DgopService.totalMemoryKB) + " + swap";
|
||||
|
||||
return "of " + DankgopService.formatSystemMemory(DankgopService.totalMemoryKB);
|
||||
return "of " + DgopService.formatSystemMemory(DgopService.totalMemoryKB);
|
||||
}
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: SettingsData.monoFontFamily
|
||||
@@ -231,40 +231,40 @@ Row {
|
||||
height: 80
|
||||
radius: Theme.cornerRadius
|
||||
color: {
|
||||
if (!DankgopService.availableGpus || DankgopService.availableGpus.length === 0) {
|
||||
if (gpuCardMouseArea.containsMouse && DankgopService.availableGpus.length > 1)
|
||||
if (!DgopService.availableGpus || DgopService.availableGpus.length === 0) {
|
||||
if (gpuCardMouseArea.containsMouse && DgopService.availableGpus.length > 1)
|
||||
return Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.16);
|
||||
else
|
||||
return Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.08);
|
||||
}
|
||||
var gpu = DankgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DankgopService.availableGpus.length - 1)];
|
||||
var gpu = DgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DgopService.availableGpus.length - 1)];
|
||||
var vendor = gpu.vendor.toLowerCase();
|
||||
if (vendor.includes("nvidia")) {
|
||||
if (gpuCardMouseArea.containsMouse && DankgopService.availableGpus.length > 1)
|
||||
if (gpuCardMouseArea.containsMouse && DgopService.availableGpus.length > 1)
|
||||
return Qt.rgba(Theme.success.r, Theme.success.g, Theme.success.b, 0.2);
|
||||
else
|
||||
return Qt.rgba(Theme.success.r, Theme.success.g, Theme.success.b, 0.12);
|
||||
} else if (vendor.includes("amd")) {
|
||||
if (gpuCardMouseArea.containsMouse && DankgopService.availableGpus.length > 1)
|
||||
if (gpuCardMouseArea.containsMouse && DgopService.availableGpus.length > 1)
|
||||
return Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.2);
|
||||
else
|
||||
return Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.12);
|
||||
} else if (vendor.includes("intel")) {
|
||||
if (gpuCardMouseArea.containsMouse && DankgopService.availableGpus.length > 1)
|
||||
if (gpuCardMouseArea.containsMouse && DgopService.availableGpus.length > 1)
|
||||
return Qt.rgba(Theme.info.r, Theme.info.g, Theme.info.b, 0.2);
|
||||
else
|
||||
return Qt.rgba(Theme.info.r, Theme.info.g, Theme.info.b, 0.12);
|
||||
}
|
||||
if (gpuCardMouseArea.containsMouse && DankgopService.availableGpus.length > 1)
|
||||
if (gpuCardMouseArea.containsMouse && DgopService.availableGpus.length > 1)
|
||||
return Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.16);
|
||||
else
|
||||
return Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.08);
|
||||
}
|
||||
border.color: {
|
||||
if (!DankgopService.availableGpus || DankgopService.availableGpus.length === 0)
|
||||
if (!DgopService.availableGpus || DgopService.availableGpus.length === 0)
|
||||
return Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.2);
|
||||
|
||||
var gpu = DankgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DankgopService.availableGpus.length - 1)];
|
||||
var gpu = DgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DgopService.availableGpus.length - 1)];
|
||||
var vendor = gpu.vendor.toLowerCase();
|
||||
if (vendor.includes("nvidia"))
|
||||
return Qt.rgba(Theme.success.r, Theme.success.g, Theme.success.b, 0.3);
|
||||
@@ -282,11 +282,11 @@ Row {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
cursorShape: DankgopService.availableGpus.length > 1 ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
cursorShape: DgopService.availableGpus.length > 1 ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
onClicked: (mouse) => {
|
||||
if (mouse.button === Qt.LeftButton) {
|
||||
if (DankgopService.availableGpus.length > 1) {
|
||||
var nextIndex = (SessionData.selectedGpuIndex + 1) % DankgopService.availableGpus.length;
|
||||
if (DgopService.availableGpus.length > 1) {
|
||||
var nextIndex = (SessionData.selectedGpuIndex + 1) % DgopService.availableGpus.length;
|
||||
SessionData.setSelectedGpuIndex(nextIndex);
|
||||
}
|
||||
} else if (mouse.button === Qt.RightButton) {
|
||||
@@ -311,10 +311,10 @@ Row {
|
||||
|
||||
StyledText {
|
||||
text: {
|
||||
if (!DankgopService.availableGpus || DankgopService.availableGpus.length === 0)
|
||||
if (!DgopService.availableGpus || DgopService.availableGpus.length === 0)
|
||||
return "No GPU";
|
||||
|
||||
var gpu = DankgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DankgopService.availableGpus.length - 1)];
|
||||
var gpu = DgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DgopService.availableGpus.length - 1)];
|
||||
// Check if temperature monitoring is enabled for this GPU
|
||||
var tempEnabled = SessionData.enabledGpuPciIds && SessionData.enabledGpuPciIds.indexOf(gpu.pciId) !== -1;
|
||||
var temp = gpu.temperature;
|
||||
@@ -328,10 +328,10 @@ Row {
|
||||
font.family: SettingsData.monoFontFamily
|
||||
font.weight: Font.Bold
|
||||
color: {
|
||||
if (!DankgopService.availableGpus || DankgopService.availableGpus.length === 0)
|
||||
if (!DgopService.availableGpus || DgopService.availableGpus.length === 0)
|
||||
return Theme.surfaceText;
|
||||
|
||||
var gpu = DankgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DankgopService.availableGpus.length - 1)];
|
||||
var gpu = DgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DgopService.availableGpus.length - 1)];
|
||||
var tempEnabled = SessionData.enabledGpuPciIds && SessionData.enabledGpuPciIds.indexOf(gpu.pciId) !== -1;
|
||||
var temp = gpu.temperature || 0;
|
||||
if (tempEnabled && temp > 80)
|
||||
@@ -346,10 +346,10 @@ Row {
|
||||
|
||||
StyledText {
|
||||
text: {
|
||||
if (!DankgopService.availableGpus || DankgopService.availableGpus.length === 0)
|
||||
if (!DgopService.availableGpus || DgopService.availableGpus.length === 0)
|
||||
return "No GPUs detected";
|
||||
|
||||
var gpu = DankgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DankgopService.availableGpus.length - 1)];
|
||||
var gpu = DgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DgopService.availableGpus.length - 1)];
|
||||
var tempEnabled = SessionData.enabledGpuPciIds && SessionData.enabledGpuPciIds.indexOf(gpu.pciId) !== -1;
|
||||
var temp = gpu.temperature;
|
||||
var hasTemp = tempEnabled && temp !== undefined && temp !== null && temp !== 0;
|
||||
@@ -376,21 +376,21 @@ Row {
|
||||
text: "Enable GPU Temperature"
|
||||
checkable: true
|
||||
checked: {
|
||||
if (!DankgopService.availableGpus || DankgopService.availableGpus.length === 0) {
|
||||
if (!DgopService.availableGpus || DgopService.availableGpus.length === 0) {
|
||||
return false
|
||||
}
|
||||
|
||||
var gpu = DankgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DankgopService.availableGpus.length - 1)]
|
||||
var gpu = DgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DgopService.availableGpus.length - 1)]
|
||||
if (!gpu.pciId) return false
|
||||
|
||||
return SessionData.enabledGpuPciIds ? SessionData.enabledGpuPciIds.indexOf(gpu.pciId) !== -1 : false
|
||||
}
|
||||
onTriggered: {
|
||||
if (!DankgopService.availableGpus || DankgopService.availableGpus.length === 0) {
|
||||
if (!DgopService.availableGpus || DgopService.availableGpus.length === 0) {
|
||||
return
|
||||
}
|
||||
|
||||
var gpu = DankgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DankgopService.availableGpus.length - 1)]
|
||||
var gpu = DgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DgopService.availableGpus.length - 1)]
|
||||
if (!gpu.pciId) return
|
||||
|
||||
var enabledIds = SessionData.enabledGpuPciIds ? SessionData.enabledGpuPciIds.slice() : []
|
||||
@@ -398,10 +398,10 @@ Row {
|
||||
|
||||
if (checked && index === -1) {
|
||||
enabledIds.push(gpu.pciId)
|
||||
DankgopService.addGpuPciId(gpu.pciId)
|
||||
DgopService.addGpuPciId(gpu.pciId)
|
||||
} else if (!checked && index !== -1) {
|
||||
enabledIds.splice(index, 1)
|
||||
DankgopService.removeGpuPciId(gpu.pciId)
|
||||
DgopService.removeGpuPciId(gpu.pciId)
|
||||
}
|
||||
|
||||
SessionData.setEnabledGpuPciIds(enabledIds)
|
||||
|
||||
@@ -10,10 +10,10 @@ ScrollView {
|
||||
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||
Component.onCompleted: {
|
||||
DankgopService.addRef(["system", "hardware", "diskmounts"])
|
||||
DgopService.addRef(["system", "hardware", "diskmounts"])
|
||||
}
|
||||
Component.onDestruction: {
|
||||
DankgopService.removeRef(["system", "hardware", "diskmounts"])
|
||||
DgopService.removeRef(["system", "hardware", "diskmounts"])
|
||||
}
|
||||
|
||||
Column {
|
||||
@@ -52,7 +52,7 @@ ScrollView {
|
||||
spacing: Theme.spacingS
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.hostname
|
||||
text: DgopService.hostname
|
||||
font.pixelSize: Theme.fontSizeXLarge
|
||||
font.family: SettingsData.monoFontFamily
|
||||
font.weight: Font.Light
|
||||
@@ -61,8 +61,8 @@ ScrollView {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.distribution + " • " + DankgopService.architecture
|
||||
+ " • " + DankgopService.kernelVersion
|
||||
text: DgopService.distribution + " • " + DgopService.architecture
|
||||
+ " • " + DgopService.kernelVersion
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.family: SettingsData.monoFontFamily
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g,
|
||||
@@ -71,7 +71,7 @@ ScrollView {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: "Up " + UserInfoService.uptime + " • Boot: " + DankgopService.bootTime
|
||||
text: "Up " + UserInfoService.uptime + " • Boot: " + DgopService.bootTime
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: SettingsData.monoFontFamily
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g,
|
||||
@@ -80,9 +80,9 @@ ScrollView {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: "Load: " + DankgopService.loadAverage + " • "
|
||||
+ DankgopService.processCount + " processes, "
|
||||
+ DankgopService.threadCount + " threads"
|
||||
text: "Load: " + DgopService.loadAverage + " • "
|
||||
+ DgopService.processCount + " processes, "
|
||||
+ DgopService.threadCount + " threads"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: SettingsData.monoFontFamily
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g,
|
||||
@@ -144,7 +144,7 @@ ScrollView {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.cpuModel
|
||||
text: DgopService.cpuModel
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: SettingsData.monoFontFamily
|
||||
font.weight: Font.Medium
|
||||
@@ -157,7 +157,7 @@ ScrollView {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.motherboard
|
||||
text: DgopService.motherboard
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: SettingsData.monoFontFamily
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g,
|
||||
@@ -170,7 +170,7 @@ ScrollView {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: "BIOS " + DankgopService.biosVersion
|
||||
text: "BIOS " + DgopService.biosVersion
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: SettingsData.monoFontFamily
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g,
|
||||
@@ -181,8 +181,8 @@ ScrollView {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DankgopService.formatSystemMemory(
|
||||
DankgopService.totalMemoryKB) + " RAM"
|
||||
text: DgopService.formatSystemMemory(
|
||||
DgopService.totalMemoryKB) + " RAM"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: SettingsData.monoFontFamily
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g,
|
||||
@@ -206,11 +206,11 @@ ScrollView {
|
||||
Theme.surfaceContainerHigh.g,
|
||||
Theme.surfaceContainerHigh.b, 0.6)
|
||||
|
||||
if (!DankgopService.availableGpus || DankgopService.availableGpus.length === 0) {
|
||||
return gpuCardMouseArea.containsMouse && DankgopService.availableGpus.length > 1 ? hoverColor : baseColor
|
||||
if (!DgopService.availableGpus || DgopService.availableGpus.length === 0) {
|
||||
return gpuCardMouseArea.containsMouse && DgopService.availableGpus.length > 1 ? hoverColor : baseColor
|
||||
}
|
||||
|
||||
var gpu = DankgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DankgopService.availableGpus.length - 1)]
|
||||
var gpu = DgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DgopService.availableGpus.length - 1)]
|
||||
var vendor = gpu.fullName.split(' ')[0].toLowerCase()
|
||||
var tintColor
|
||||
|
||||
@@ -221,10 +221,10 @@ ScrollView {
|
||||
} else if (vendor.includes("intel")) {
|
||||
tintColor = Theme.info
|
||||
} else {
|
||||
return gpuCardMouseArea.containsMouse && DankgopService.availableGpus.length > 1 ? hoverColor : baseColor
|
||||
return gpuCardMouseArea.containsMouse && DgopService.availableGpus.length > 1 ? hoverColor : baseColor
|
||||
}
|
||||
|
||||
if (gpuCardMouseArea.containsMouse && DankgopService.availableGpus.length > 1) {
|
||||
if (gpuCardMouseArea.containsMouse && DgopService.availableGpus.length > 1) {
|
||||
return Qt.rgba((hoverColor.r + tintColor.r * 0.1) / 1.1,
|
||||
(hoverColor.g + tintColor.g * 0.1) / 1.1,
|
||||
(hoverColor.b + tintColor.b * 0.1) / 1.1, 0.6)
|
||||
@@ -236,11 +236,11 @@ ScrollView {
|
||||
}
|
||||
border.width: 1
|
||||
border.color: {
|
||||
if (!DankgopService.availableGpus || DankgopService.availableGpus.length === 0) {
|
||||
if (!DgopService.availableGpus || DgopService.availableGpus.length === 0) {
|
||||
return Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.1)
|
||||
}
|
||||
|
||||
var gpu = DankgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DankgopService.availableGpus.length - 1)]
|
||||
var gpu = DgopService.availableGpus[Math.min(SessionData.selectedGpuIndex, DgopService.availableGpus.length - 1)]
|
||||
var vendor = gpu.fullName.split(' ')[0].toLowerCase()
|
||||
|
||||
if (vendor.includes("nvidia")) {
|
||||
@@ -258,12 +258,12 @@ ScrollView {
|
||||
id: gpuCardMouseArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: DankgopService.availableGpus.length
|
||||
cursorShape: DgopService.availableGpus.length
|
||||
> 1 ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
onClicked: {
|
||||
if (DankgopService.availableGpus.length > 1) {
|
||||
if (DgopService.availableGpus.length > 1) {
|
||||
var nextIndex = (SessionData.selectedGpuIndex + 1)
|
||||
% DankgopService.availableGpus.length
|
||||
% DgopService.availableGpus.length
|
||||
SessionData.setSelectedGpuIndex(nextIndex)
|
||||
}
|
||||
}
|
||||
@@ -301,13 +301,13 @@ ScrollView {
|
||||
|
||||
StyledText {
|
||||
text: {
|
||||
if (!DankgopService.availableGpus
|
||||
|| DankgopService.availableGpus.length === 0) {
|
||||
if (!DgopService.availableGpus
|
||||
|| DgopService.availableGpus.length === 0) {
|
||||
return "No GPUs detected"
|
||||
}
|
||||
var gpu = DankgopService.availableGpus[Math.min(
|
||||
var gpu = DgopService.availableGpus[Math.min(
|
||||
SessionData.selectedGpuIndex,
|
||||
DankgopService.availableGpus.length
|
||||
DgopService.availableGpus.length
|
||||
- 1)]
|
||||
return gpu.fullName
|
||||
}
|
||||
@@ -323,13 +323,13 @@ ScrollView {
|
||||
|
||||
StyledText {
|
||||
text: {
|
||||
if (!DankgopService.availableGpus
|
||||
|| DankgopService.availableGpus.length === 0) {
|
||||
if (!DgopService.availableGpus
|
||||
|| DgopService.availableGpus.length === 0) {
|
||||
return "Device: N/A"
|
||||
}
|
||||
var gpu = DankgopService.availableGpus[Math.min(
|
||||
var gpu = DgopService.availableGpus[Math.min(
|
||||
SessionData.selectedGpuIndex,
|
||||
DankgopService.availableGpus.length
|
||||
DgopService.availableGpus.length
|
||||
- 1)]
|
||||
return "Device: " + gpu.pciId
|
||||
}
|
||||
@@ -345,13 +345,13 @@ ScrollView {
|
||||
|
||||
StyledText {
|
||||
text: {
|
||||
if (!DankgopService.availableGpus
|
||||
|| DankgopService.availableGpus.length === 0) {
|
||||
if (!DgopService.availableGpus
|
||||
|| DgopService.availableGpus.length === 0) {
|
||||
return "Driver: N/A"
|
||||
}
|
||||
var gpu = DankgopService.availableGpus[Math.min(
|
||||
var gpu = DgopService.availableGpus[Math.min(
|
||||
SessionData.selectedGpuIndex,
|
||||
DankgopService.availableGpus.length
|
||||
DgopService.availableGpus.length
|
||||
- 1)]
|
||||
return "Driver: " + gpu.driver
|
||||
}
|
||||
@@ -366,13 +366,13 @@ ScrollView {
|
||||
|
||||
StyledText {
|
||||
text: {
|
||||
if (!DankgopService.availableGpus
|
||||
|| DankgopService.availableGpus.length === 0) {
|
||||
if (!DgopService.availableGpus
|
||||
|| DgopService.availableGpus.length === 0) {
|
||||
return "Temp: --°"
|
||||
}
|
||||
var gpu = DankgopService.availableGpus[Math.min(
|
||||
var gpu = DgopService.availableGpus[Math.min(
|
||||
SessionData.selectedGpuIndex,
|
||||
DankgopService.availableGpus.length
|
||||
DgopService.availableGpus.length
|
||||
- 1)]
|
||||
var temp = gpu.temperature
|
||||
return "Temp: " + ((temp === undefined || temp === null
|
||||
@@ -382,14 +382,14 @@ ScrollView {
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: SettingsData.monoFontFamily
|
||||
color: {
|
||||
if (!DankgopService.availableGpus
|
||||
|| DankgopService.availableGpus.length === 0) {
|
||||
if (!DgopService.availableGpus
|
||||
|| DgopService.availableGpus.length === 0) {
|
||||
return Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g,
|
||||
Theme.surfaceText.b, 0.7)
|
||||
}
|
||||
var gpu = DankgopService.availableGpus[Math.min(
|
||||
var gpu = DgopService.availableGpus[Math.min(
|
||||
SessionData.selectedGpuIndex,
|
||||
DankgopService.availableGpus.length
|
||||
DgopService.availableGpus.length
|
||||
- 1)]
|
||||
var temp = gpu.temperature || 0
|
||||
if (temp > 80)
|
||||
@@ -532,7 +532,7 @@ ScrollView {
|
||||
Repeater {
|
||||
id: diskMountRepeater
|
||||
|
||||
model: DankgopService.diskMounts
|
||||
model: DgopService.diskMounts
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
|
||||
Reference in New Issue
Block a user