diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2009-10-16 20:37:41 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2009-10-16 20:37:41 +0200 |
commit | da8cb9ebfc69b9f56dbd5764f4da6ba22fd087de (patch) | |
tree | 10094d55a36efa5d6cf18ce2ca32fc81e323d1fa /i3status.c | |
parent | 8a66289702bb17c2874497319ea2a2921e7a3e0d (diff) |
Implement option to use the last full capacity instead of the design capacity
Diffstat (limited to 'i3status.c')
-rw-r--r-- | i3status.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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")); |