From 8d676a2167c70e35a431b167dd0088bc3ae41042 Mon Sep 17 00:00:00 2001 From: Squibid Date: Mon, 29 Sep 2025 23:51:36 -0400 Subject: [PATCH] add more info about configuring event-handler --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d88f9f4..e786397 100644 --- a/README.md +++ b/README.md @@ -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 it 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).