]> git.sur5r.net Git - i3/i3status/blobdiff - i3status.c
man: mention i3bar in the description (Thanks andi)
[i3/i3status] / i3status.c
index c1f6039b51c02c074cdd911a4f263ce345ceba77..df233f75911de0fcab6c75fdb6857c961d2a7695 100644 (file)
@@ -230,10 +230,12 @@ int main(int argc, char *argv[]) {
 
         cfg_opt_t battery_opts[] = {
                 CFG_STR("format", "%status %percentage %remaining", CFGF_NONE),
+                CFG_STR("format_down", "No battery", 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_BOOL("integer_battery_capacity", false, CFGF_NONE),
                 CFG_CUSTOM_COLOR_OPTS,
                 CFG_END()
         };
@@ -256,6 +258,8 @@ int main(int argc, char *argv[]) {
 
         cfg_opt_t load_opts[] = {
                 CFG_STR("format", "%1min %5min %15min", CFGF_NONE),
+                CFG_INT("max_threshold", 5, CFGF_NONE),
+                CFG_CUSTOM_COLOR_OPTS,
                 CFG_END()
         };
 
@@ -441,7 +445,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_getint(sec, "low_threshold"), cfg_getstr(sec, "threshold_type"), cfg_getbool(sec, "last_full_capacity"));
+                                print_battery_info(json_gen, buffer, atoi(title), cfg_getstr(sec, "path"), cfg_getstr(sec, "format"), cfg_getstr(sec, "format_down"), cfg_getint(sec, "low_threshold"), cfg_getstr(sec, "threshold_type"), cfg_getbool(sec, "last_full_capacity"), cfg_getbool(sec, "integer_battery_capacity"));
                                 SEC_CLOSE_MAP;
                         }
 
@@ -459,7 +463,7 @@ int main(int argc, char *argv[]) {
 
                         CASE_SEC("load") {
                                 SEC_OPEN_MAP("load");
-                                print_load(json_gen, buffer, cfg_getstr(sec, "format"));
+                                print_load(json_gen, buffer, cfg_getstr(sec, "format"), cfg_getint(sec, "max_threshold"));
                                 SEC_CLOSE_MAP;
                         }