From da8cb9ebfc69b9f56dbd5764f4da6ba22fd087de Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 16 Oct 2009 20:37:41 +0200 Subject: Implement option to use the last full capacity instead of the design capacity --- i3status.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'i3status.c') diff --git a/i3status.c b/i3status.c index 0e35eab..c9ded2f 100644 --- a/i3status.c +++ b/i3status.c @@ -71,6 +71,7 @@ int main(int argc, char *argv[]) { cfg_opt_t battery_opts[] = { CFG_STR("format", "%status %remaining", CFGF_NONE), + CFG_BOOL("last_full_capacity", false, CFGF_NONE), CFG_END() }; @@ -157,7 +158,7 @@ int main(int argc, char *argv[]) { print_eth_info(title, cfg_getstr(sec, "format_up"), cfg_getstr(sec, "format_down")); CASE_SEC_TITLE("battery") - print_battery_info(atoi(title), cfg_getstr(sec, "format")); + print_battery_info(atoi(title), cfg_getstr(sec, "format"), cfg_getbool(sec, "last_full_capacity")); CASE_SEC_TITLE("run_watch") print_run_watch(title, cfg_getstr(sec, "pidfile"), cfg_getstr(sec, "format")); -- cgit v1.2.3