summaryrefslogtreecommitdiff
path: root/i3status.c
diff options
context:
space:
mode:
authorJulien Lequertier <git@avrelaun.com>2013-02-10 17:59:37 +0100
committerMichael Stapelberg <michael@stapelberg.de>2013-02-14 19:35:15 +0100
commit67c2c1a7ead6bcdcd07080e581013fa7a0b58b6f (patch)
treecdda81830825842127c90df4b196b85c86d9f4f0 /i3status.c
parent8c273e54b867aeedcd1eadfbd6f4e4fad3690f74 (diff)
Added option to show battery capacity without decimals
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 c1f6039..3fe3f47 100644
--- a/i3status.c
+++ b/i3status.c
@@ -234,6 +234,7 @@ int main(int argc, char *argv[]) {
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()
};
@@ -441,7 +442,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_getint(sec, "low_threshold"), cfg_getstr(sec, "threshold_type"), cfg_getbool(sec, "last_full_capacity"), cfg_getbool(sec, "integer_battery_capacity"));
SEC_CLOSE_MAP;
}