Support per-power-source profile overrides in omarchy-powerprofiles-set#6157
Open
fase29 wants to merge 1 commit into
Open
Support per-power-source profile overrides in omarchy-powerprofiles-set#6157fase29 wants to merge 1 commit into
fase29 wants to merge 1 commit into
Conversation
Read optional battery/ac profile preferences from ~/.config/omarchy/power-profile. Falls back to the existing performance-on-AC / balanced-on-battery defaults when the file is absent or a value is invalid, so default behavior is unchanged.
Contributor
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an optional user config file at
~/.config/omarchy/power-profilethat letsyou choose which power profile is applied on battery vs. on AC:
Each key is looked up against the profiles reported by
powerprofilesctl list,so any valid profile name works.
Why
The udev rule installed by
powerprofilesctl-rules.shrunsomarchy-powerprofiles-seton every AC/USB power event, and the scriptunconditionally forces
performancewhenever the machine is on AC.On my laptop that's a problem:
performancemakes the chassis run hot enoughthat the built-in keyboard becomes uncomfortable to type on. I want to stay on
power-saver(orbalanced) even while plugged in, but there was no way to dothat short of editing the script directly — which
git pullreverts on the nextupdate.
This makes the AC/battery profile targets configurable, so the tradeoff between
performance and heat/noise/battery can be set to preference instead of being
hardcoded.
Behavior
identical to today:
performanceon AC (falling back tobalancedifunavailable),
balancedon battery.defaults, so a typo can never leave the machine in a broken state.
$HOME,because udev invokes the script as root via
systemd-run.Example
~/.config/omarchy/power-profile
Keeps the laptop cool and quiet regardless of whether it's plugged in.