add more info about configuring event-handler

This commit is contained in:
2025-09-29 23:51:36 -04:00
parent c89bcb4d68
commit 83c106a7b4

View File

@@ -15,7 +15,20 @@ going to sleep. The inhibitor is removed when the system is unplugged.
> monitor battery events ensure you have it installed and running before using
> event-handler
## Default Config
## Configuring
I built event-handler to be used as a service independent of my current user
and such event-handler does not read the configuration file from any default
path. Instead it's up to you to choose where it is and pass the file's full
path into event-handler like so:
```bash
eh -c ./config.toml
```
The config is completely optional, however you will most likely need to as the
default is setup for my framework 13 system running Void Linux. Below are the
defaults:
### Default Config
```toml
[battery]
status_path = "/sys/class/power_supply/BAT1"
@@ -31,3 +44,8 @@ timing_formula = "1.7 + 18.5 * exp(-0.29 * p)" # p is the percentage of the batt
[acpi_daemon]
socket_path = "/run/acpid.socket"
```
> [!NOTE]
> The default formula may or may not work above 15 percent due to led
> shenanigans. If you wish to craft your own formula all relevant notation may
> be found in [this repo](https://github.com/codeplea/tinyexpr).