1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

cc: allow pinning brightness device per-monitor

This commit is contained in:
bbedward
2025-10-22 16:30:51 -04:00
parent 6c4d27be8a
commit a25e929200
8 changed files with 227 additions and 54 deletions

View File

@@ -189,6 +189,7 @@ Singleton {
property bool lockBeforeSuspend: false
property bool loginctlLockIntegration: true
property string launchPrefix: ""
property var brightnessDevicePins: ({})
property bool gtkThemingEnabled: false
property bool qtThemingEnabled: false
@@ -507,6 +508,7 @@ Singleton {
lockBeforeSuspend = settings.lockBeforeSuspend !== undefined ? settings.lockBeforeSuspend : false
loginctlLockIntegration = settings.loginctlLockIntegration !== undefined ? settings.loginctlLockIntegration : true
launchPrefix = settings.launchPrefix !== undefined ? settings.launchPrefix : ""
brightnessDevicePins = settings.brightnessDevicePins !== undefined ? settings.brightnessDevicePins : ({})
if (settings.configVersion === undefined) {
migrateFromUndefinedToV1(settings)
@@ -688,6 +690,7 @@ Singleton {
"lockBeforeSuspend": lockBeforeSuspend,
"loginctlLockIntegration": loginctlLockIntegration,
"launchPrefix": launchPrefix,
"brightnessDevicePins": brightnessDevicePins,
"configVersion": settingsConfigVersion
}, null, 2))
}
@@ -743,7 +746,7 @@ Singleton {
"screenPreferences", "animationSpeed", "customAnimationDuration", "acMonitorTimeout", "acLockTimeout",
"acSuspendTimeout", "acHibernateTimeout", "batteryMonitorTimeout", "batteryLockTimeout",
"batterySuspendTimeout", "batteryHibernateTimeout", "lockBeforeSuspend",
"loginctlLockIntegration", "launchPrefix", "configVersion"
"loginctlLockIntegration", "launchPrefix", "brightnessDevicePins", "configVersion"
]
try {
@@ -1809,6 +1812,11 @@ Singleton {
saveSettings()
}
function setBrightnessDevicePins(pins) {
brightnessDevicePins = pins
saveSettings()
}
function getPluginSetting(pluginId, key, defaultValue) {
if (!pluginSettings[pluginId]) {
return defaultValue