1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-11 07:52:50 -05:00

brightness: remove brightnessctl + ddcutil dependencies

- Switches to DMS API v13+ dependency
This commit is contained in:
bbedward
2025-11-02 20:22:45 -05:00
parent 66e3cc77c5
commit 976ff108b3
6 changed files with 277 additions and 788 deletions

View File

@@ -1,6 +1,6 @@
pragma Singleton
pragma ComponentBehavior: Bound
pragma ComponentBehavior
import QtCore
import QtQuick
@@ -34,16 +34,17 @@ Singleton {
signal searchResultsReceived(var plugins)
signal operationSuccess(string message)
signal operationError(string error)
signal connectionStateChanged()
signal connectionStateChanged
signal networkStateUpdate(var data)
signal cupsStateUpdate(var data)
signal loginctlStateUpdate(var data)
signal loginctlEvent(var event)
signal capabilitiesReceived()
signal capabilitiesReceived
signal credentialsRequest(var data)
signal bluetoothPairingRequest(var data)
signal dwlStateUpdate(var data)
signal brightnessStateUpdate(var data)
Component.onCompleted: {
if (socketPath && socketPath.length > 0) {
@@ -227,11 +228,7 @@ Singleton {
if (response.error.includes("unknown method") && response.error.includes("subscribe")) {
if (!shownOutdatedError) {
console.error("DMSService: Server does not support subscribe method")
ToastService.showError(
I18n.tr("DMS out of date"),
I18n.tr("To update, run the following command:"),
updateCommand
)
ToastService.showError(I18n.tr("DMS out of date"), I18n.tr("To update, run the following command:"), updateCommand)
shownOutdatedError = true
}
}
@@ -272,6 +269,8 @@ Singleton {
cupsStateUpdate(data)
} else if (service === "dwl") {
dwlStateUpdate(data)
} else if (service === "brightness") {
brightnessStateUpdate(data)
}
}
@@ -280,8 +279,8 @@ Singleton {
console.warn("DMSService.sendRequest: Not connected, method:", method)
if (callback) {
callback({
"error": "not connected to DMS socket"
})
"error": "not connected to DMS socket"
})
}
return
}