#include 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); }