X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=i3status.c;h=915cbccdb33be9f72fd73754c4fae51033bb42ae;hb=7dcc961fa2d755ed47b29de778a2d2baf8dac7ba;hp=15c58da668eab3e2cead1d81ee5a4cc97fec60af;hpb=4ddd115af8e6247788c78dc3630d37f2f4493e03;p=i3%2Fi3status diff --git a/i3status.c b/i3status.c index 15c58da..915cbcc 100644 --- a/i3status.c +++ b/i3status.c @@ -214,6 +214,8 @@ int main(int argc, char *argv[]) { cfg_opt_t battery_opts[] = { CFG_STR("format", "%status %percentage %remaining", CFGF_NONE), CFG_STR("path", "/sys/class/power_supply/BAT%d/uevent", CFGF_NONE), + CFG_INT("low_threshold", 30, CFGF_NONE), + CFG_STR("threshold_type", "time", CFGF_NONE), CFG_BOOL("last_full_capacity", false, CFGF_NONE), CFG_END() }; @@ -413,7 +415,7 @@ int main(int argc, char *argv[]) { CASE_SEC_TITLE("battery") { SEC_OPEN_MAP("battery"); - print_battery_info(json_gen, buffer, atoi(title), cfg_getstr(sec, "path"), cfg_getstr(sec, "format"), cfg_getbool(sec, "last_full_capacity")); + print_battery_info(json_gen, buffer, atoi(title), cfg_getstr(sec, "path"), cfg_getstr(sec, "format"), cfg_getint(sec, "low_threshold"), cfg_getstr(sec, "threshold_type"), cfg_getbool(sec, "last_full_capacity")); SEC_CLOSE_MAP; }