From 400a18a8ed54f3ac8e44d7178f9ac94d7621ee7f Mon Sep 17 00:00:00 2001 From: purian23 Date: Sun, 2 Aug 2026 19:01:39 -0400 Subject: [PATCH] fix(battery): reliably apply configured power profiles at shell startup Port 1.5 --- quickshell/Services/BatteryService.qml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/quickshell/Services/BatteryService.qml b/quickshell/Services/BatteryService.qml index b732043b0..1f0d98030 100644 --- a/quickshell/Services/BatteryService.qml +++ b/quickshell/Services/BatteryService.qml @@ -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")