feat(rofi): battery charge-limit toggle in the System menu
All checks were successful
Check / eval (push) Successful in 2m54s

Add a `batterylimit` nomarchy-menu subcommand — a preset picker
(80/90/60/Off/Custom…) that writes settings.power.batteryChargeLimit via
theme-sync (--no-switch; lands on the next sys-rebuild, power.nix's oneshot
applies it). Surfaced as a first-class System row, self-gated on the
charge_control_end_threshold sysfs node like Power profile.

Moved out of the gum control-center (removed its Battery Limit case +
choose entry) so the toggle lives in one place — the rofi menu Bernardo
actually uses, per his request.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 22:50:26 +01:00
parent a8391c381d
commit 60c6f14c08
5 changed files with 79 additions and 38 deletions

View File

@@ -17,6 +17,23 @@ Template:
---
## 2026-07-07 — Battery-limit toggle in rofi System (iteration #64, item 36a)
- **Task:** BACKLOG item 36(a) — Bernardo wanted the charge-threshold
toggle as a first-class row in `nomarchy-menu System`, not buried in
the gum control-center where #55 put it.
- **Fix:** `rofi.nix` — new `batterylimit` subcommand: a preset picker
(80%/90%/60%/Off/Custom…) with battery-0XX icons, writing the baked
`settings.power.batteryChargeLimit` via theme-sync `--no-switch` (lands
on next sys-rebuild; power.nix's oneshot applies it). Added a System row
self-gated on the `charge_control_end_threshold` sysfs node (like Power
profile), dispatch, and usage string. **Moved** — removed the duplicate
"Battery Limit" case + choose entry from `nomarchy-control-center.sh` so
it lives in one place.
- **Verified:** V0 green. V1: control-center builds clean (shellcheck),
home activation builds clean (writeShellScriptBin's `bash -n` on the
menu passed); grepped the built script to confirm the row/dispatch/case/
guard are all present. Live menu interaction is a V3 check (queued).
## 2026-07-07 — Floating-window audit, conservative cut (iteration #63, item 41)
- **Task:** BACKLOG item 41 — Bernardo: "take a conservative approach."
Broaden the windowrule float set beyond the mixer.