From 4b3e21445ba7c539050f34d04c81a119b139f8b6 Mon Sep 17 00:00:00 2001 From: Pierre Olivier Martel Date: Tue, 3 Feb 2026 10:18:24 -0500 Subject: [PATCH] Don't apply power profile source switching if only one profile is available (#4485) --- install/config/powerprofilesctl-rules.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/install/config/powerprofilesctl-rules.sh b/install/config/powerprofilesctl-rules.sh index e1b4da91..da18f24d 100755 --- a/install/config/powerprofilesctl-rules.sh +++ b/install/config/powerprofilesctl-rules.sh @@ -1,19 +1,15 @@ if omarchy-battery-present; then mapfile -t profiles < <(omarchy-powerprofiles-list) - if [[ ${#profiles[@]} -gt 0 ]]; then + if [[ ${#profiles[@]} -gt 1 ]]; then # Default AC profile: # 3 profiles → performance # 2 profiles → balanced - # 1 profile → profiles[0] - ac_profile="${profiles[2]:-${profiles[1]:-${profiles[0]}}}" + ac_profile="${profiles[2]:-${profiles[1]}}" - # Default Battery profile: - # 3 profiles → balanced - # 2 profiles → balanced - # 1 profile → profiles[0] - battery_profile="${profiles[1]:-${profiles[0]}}" + # Default Battery profile (balanced) + battery_profile="${profiles[1]}" cat <