Add charging providers#5533
Conversation
There was a problem hiding this comment.
Pull request overview
This PR integrates battery charging controls by packaging omarchy-battery-policy, adding a Setup UI entry for battery charging when supported, and ensuring the package is installed for both new installs and existing users via migration.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Changes:
- Add
omarchy-battery-policyto the base install package set and install it for existing users via a new migration. - Update Setup menu to group power-related items under “Power” and conditionally show “Battery Charging”.
- Harden a couple of scripts by adding early-exit guards and improving PipeWire mute-state detection.
Reviewed changes
Copilot reviewed 2 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| migrations/1776965163.sh | Installs omarchy-battery-policy on existing systems when missing. |
| install/omarchy-base.packages | Includes omarchy-battery-policy in the default package set for fresh installs. |
| bin/omarchy-migrate | Improves quoting when iterating and executing migration scripts. |
| bin/omarchy-menu | Adds Setup → Power submenu and conditionally surfaces Battery Charging entry. |
| bin/omarchy-hyprland-monitor-scaling-cycle | Adds a guard intended to avoid operating when no active monitor is present. |
| bin/omarchy-hw-match | Exits early when invoked without a match argument. |
| bin/omarchy-audio-input-mute-thinkpad | Uses wpctl output to detect mute state after toggling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This is excellent, but I'd like to expose the settings like we do with the power profile. So we can control the whole thing from within the omarchy menu instead of shelling out. So that means you expose a cli that can give us the options, current value, and ability to set. Just like do with the power profiles. |
|
Okay yea that makes sense. I will get it integrated into the menu. |
Move all battery charging policy scripts out of the omarchy bin/ into the new omarchy-battery-policy package in omarchy-pkgs. Omarchy now depends on the installed package; the menu integration is unchanged.
- Add migration to install omarchy-battery-policy package for existing users - Quote $OMARCHY_PATH in omarchy-migrate to handle paths with spaces - Guard empty $1 in omarchy-hw-match to prevent false positives - Guard null/empty ACTIVE_MONITOR in monitor scaling cycle - Use omarchy-swayosd-client wrapper in ThinkPad mic mute script - Use wpctl to read mute state (same API as the toggle) - Commit omarchy-dev-battery-policy-test with tombstone comment explaining why deleted scripts remain in FILES for live-install cleanup
17400b9 to
becb25e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 9 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.





Summary
Notes
Testing
Dependent on: omacom-io/omarchy-pkgs#88
Ref: #5144
CC: @spaceXrace @dhh