1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-03 12:08:31 -04:00

fix(battery): reliably apply configured power profiles at shell startup

Port 1.5
This commit is contained in:
purian23
2026-08-02 19:01:39 -04:00
parent 32ddf614c3
commit 400a18a8ed
+8 -1
View File
@@ -23,6 +23,13 @@ Singleton {
}
}
Connections {
target: typeof PowerProfiles !== "undefined" ? PowerProfiles : null
function onHasPerformanceProfileChanged() {
root.applyPowerProfile();
}
}
function applyPowerProfile() {
if (!batteryAvailable)
return;
@@ -32,7 +39,7 @@ Singleton {
const targetProfile = parseInt(profileValue);
if (isNaN(targetProfile) || PowerProfiles.profile === targetProfile)
return;
PowerProfiles.profile = targetProfile;
PowerProfileWatcher.applyProfile(targetProfile);
}
readonly property string preferredBatteryOverride: Quickshell.env("DMS_PREFERRED_BATTERY")