moonarch/defaults/etc/udev/rules.d/90-moonarch-battery.rules
nevaforget 579a948449
All checks were successful
Update PKGBUILD version / update-pkgver (push) Successful in 2s
feat: add battery conservation mode with Waybar toggle
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.
2026-04-08 09:55:46 +02:00

5 lines
366 B
Plaintext

# ABOUTME: udev rule granting wheel group write access to battery charge threshold.
# ABOUTME: Enables unprivileged toggling of conservation mode via moonarch-batsaver-toggle.
SUBSYSTEM=="power_supply", ATTR{type}=="Battery", RUN+="/bin/sh -c 'chgrp wheel /sys%p/charge_control_end_threshold 2>/dev/null; chmod g+w /sys%p/charge_control_end_threshold 2>/dev/null'"