feat: add battery conservation mode with Waybar toggle
Update PKGBUILD version / update-pkgver (push) Successful in 2s
Update PKGBUILD version / update-pkgver (push) Successful in 2s
Laptops with charge_control_end_threshold support get a click-to-toggle on the battery module (80% ↔ 100%). A ♥ icon appears when conservation is active, hidden when inactive. State persists across reboots via systemd oneshot service. udev rule grants wheel group write access so no sudo is needed for toggling.
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
# Decisions
|
||||
|
||||
## 2026-04-08 – Battery conservation mode: udev + sysfs + Waybar toggle
|
||||
- **Who**: Dominik, ClaudeCode
|
||||
- **Why**: Laptops with `charge_control_end_threshold` support benefit from limiting charge to 80% to extend battery lifespan. Needed a user-friendly toggle without requiring sudo.
|
||||
- **Tradeoffs**: udev RUN approach for permissions (group wheel gets write access) vs polkit/pkexec (password prompt on every toggle). Chose udev for seamless UX. State persisted in `/var/lib/moonarch/` (system-wide, not per-user) — acceptable since charge threshold is a hardware setting, not a user preference. Fixed 80% threshold instead of configurable — KISS, matches industry standard.
|
||||
- **How**: udev rule grants wheel group write on `charge_control_end_threshold`. Toggle script writes sysfs + state file. systemd oneshot service restores on boot. Waybar shows ♥ icon when active, hidden when inactive. Click on battery module toggles.
|
||||
|
||||
## 2026-04-07 – Walker theme: gtk-inherit → moonarch with fixed colors
|
||||
- **Who**: Dominik, ClaudeCode
|
||||
- **Why**: gtk-inherit theme relied on GTK4 color inheritance which works but doesn't update live when switching GTK themes (Walker service needs restart). Explicit color definitions make the theme self-contained and predictable.
|
||||
|
||||
Reference in New Issue
Block a user