Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions config/Config.qml
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,23 @@ Singleton {
property bool autoStart: false
property bool syncSpotify: false
}
property JsonObject resources: JsonObject {
property bool enabled: true
property string location: "dashboard"
property string barSide: "left"
property JsonObject show: JsonObject {
property bool cpu: true
property bool ram: true
property bool gpu: true
property bool disk: true
property bool barCpu: true
property bool barRam: true
property bool barGpu: true
property bool barDisk: true
property bool dashTemp: true
property bool barTemp: true
}
}
}
}

Expand Down
17 changes: 17 additions & 0 deletions config/defaults/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,22 @@ var data = {
"restTime": 300,
"autoStart": false,
"syncSpotify": false
},
"resources": {
"enabled": true,
"location": "dashboard",
"barSide": "left",
"show": {
"cpu": true,
"ram": true,
"gpu": true,
"disk": true,
"barCpu": true,
"barRam": true,
"barGpu": true,
"barDisk": true,
"dashTemp": true,
"barTemp": true
}
}
}
58 changes: 58 additions & 0 deletions modules/bar/BarContent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ Item {
// Shadow logic for bar components
readonly property bool shadowsEnabled: Config.showBackground && (!actualContainBar || (Config.bar && Config.bar.keepBarShadow !== undefined ? Config.bar.keepBarShadow : false))

// Resource monitor placement — top-level bindings ensure reactive updates on config change
readonly property bool resourceMonitorEnabled: Config.system.resources ? Config.system.resources.enabled !== false : false
readonly property bool resourceMonitorInBar: resourceMonitorEnabled && (Config.system.resources ? (Config.system.resources.location === "bar" || Config.system.resources.location === "both") : false)
readonly property bool resourceMonitorLeft: resourceMonitorInBar && (Config.system.resources ? Config.system.resources.barSide !== "right" : true)
readonly property bool resourceMonitorRight: resourceMonitorInBar && !resourceMonitorLeft

// The hitbox for the mask
property alias barHitbox: barMouseArea

Expand Down Expand Up @@ -459,6 +465,19 @@ Item {
}
}

// Resource Monitor — left position (after pin button)
Loader {
active: root.resourceMonitorLeft
visible: active
Layout.alignment: Qt.AlignVCenter
sourceComponent: BarResourceMonitor {
bar: root
layerEnabled: root.shadowsEnabled
startRadius: root.outerRadius
endRadius: root.outerRadius
}
}

Item {
Layout.fillWidth: true
Layout.fillHeight: true
Expand Down Expand Up @@ -499,6 +518,19 @@ Item {
visible: !(root.orientation === "horizontal" && integratedDockEnabled)
}

// Resource Monitor — right position (before presets)
Loader {
active: root.resourceMonitorRight
visible: active
Layout.alignment: Qt.AlignVCenter
sourceComponent: BarResourceMonitor {
bar: root
layerEnabled: root.shadowsEnabled
startRadius: root.outerRadius
endRadius: root.outerRadius
}
}

PresetsButton {
id: presetsButton
startRadius: root.dockAtEnd ? root.innerRadius : root.outerRadius
Expand Down Expand Up @@ -592,6 +624,19 @@ Item {
enableShadow: root.shadowsEnabled
}

// Resource Monitor — top position (barSide = left)
Loader {
active: root.resourceMonitorLeft
visible: active
Layout.fillWidth: true
sourceComponent: BarResourceMonitor {
bar: root
layerEnabled: root.shadowsEnabled
startRadius: root.outerRadius
endRadius: root.outerRadius
}
}

// Center Group Container
Item {
Layout.fillHeight: true
Expand Down Expand Up @@ -727,6 +772,19 @@ Item {
}
}

// Resource Monitor — bottom position (barSide = right)
Loader {
active: root.resourceMonitorRight
visible: active
Layout.fillWidth: true
sourceComponent: BarResourceMonitor {
bar: root
layerEnabled: root.shadowsEnabled
startRadius: root.outerRadius
endRadius: root.outerRadius
}
}

ControlsButton {
id: controlsButtonVert
bar: root
Expand Down
Loading