summaryrefslogtreecommitdiff
path: root/i3status.c
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2009-10-16 20:37:41 +0200
committerMichael Stapelberg <michael@stapelberg.de>2009-10-16 20:37:41 +0200
commitda8cb9ebfc69b9f56dbd5764f4da6ba22fd087de (patch)
tree10094d55a36efa5d6cf18ce2ca32fc81e323d1fa /i3status.c
parent8a66289702bb17c2874497319ea2a2921e7a3e0d (diff)
Implement option to use the last full capacity instead of the design capacity
Diffstat (limited to 'i3status.c')
-rw-r--r--i3status.c3
1 files changed, 2 insertions, 1 deletions
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"));