Files
event-handler/config.h
2025-05-09 20:01:59 -05:00

9 lines
468 B
C

#include <math.h>
static const char *notification_name = "Event Handler"; /* name to use in notifications */
static const char *battery_dir = "/sys/class/power_supply/BAT1"; /* path to the batteries directory */
static const int blink_start = 15; /* percentage to start blinking at */
const double blink_formula(int x) { /* formula used to set the blinking rate, this function takes in one argument: the battery percentage */
return 1.7 + 18.5 * exp(-0.29 * x);
}