Fix/battery threshold setup (#136)

* refactor(battery-threshold): change setup to run script in terminal via sudo

* chore(battery-threshold): update dependencies

* docs(battery-threshold): update threshold.txt location description

* chore(battery-threshold): bump version
This commit is contained in:
Damian D'Souza
2026-07-28 21:12:15 -04:00
committed by GitHub
parent bd7d88dfee
commit 253668025d
4 changed files with 72 additions and 35 deletions
+3 -5
View File
@@ -13,12 +13,10 @@ while plugged in, reducing battery wear and heat.
## Requirements
- `polkit` - required for interactive setup
- Laptop hardware supporting battery charge threshold control in sysfs
(`/sys/class/power_supply/*/charge_control_end_threshold`).
- The following external programs must be available on `PATH`: `test`, `pkexec`,
`bash`, `cat`, `getent`, `groupadd`, `usermod`, `udevadm`, `chgrp`, and
`chmod`.
- The following external programs must be available on `PATH`: `test`, `sudo`,
`bash`, `readlink`, `cat`, `getent`, `groupadd`, `usermod`, `udevadm`, `chgrp`, and `chmod`.
## Usage
@@ -60,4 +58,4 @@ noctalia msg plugin damian-ds7/battery-threshold:service all setup
- **Manual Setup Fallback**: If Polkit is not available, run
`sudo ./setup_rules.sh` manually from the plugin directory.
- **Persistence**: Threshold settings are stored in `threshold.txt` in plugin
directory and restored across reboots.
data directory and restored across reboots.