summaryrefslogtreecommitdiff
path: root/i3status.c
diff options
context:
space:
mode:
authorIngo Bürk <admin@airblader.de>2019-10-28 08:38:48 +0100
committerGitHub <noreply@github.com>2019-10-28 08:38:48 +0100
commitbadef18c2238ede87773398f2f945f3492b6f4c5 (patch)
tree7398d356bd2295e1e0dd1a8156266a1750db8bc4 /i3status.c
parent3d6b1b576b3c1acd6d2932da454171cfd8e22821 (diff)
parent572c96d63ed41bfc83d7378454f3ae4505ad9601 (diff)
Merge pull request #369 from 31KM/master
Introduce memory options 'unit' and 'decimals'
Diffstat (limited to 'i3status.c')
-rw-r--r--i3status.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/i3status.c b/i3status.c
index 1ab8400..4423917 100644
--- a/i3status.c
+++ b/i3status.c
@@ -431,6 +431,8 @@ int main(int argc, char *argv[]) {
CFG_STR("threshold_degraded", NULL, CFGF_NONE),
CFG_STR("threshold_critical", NULL, CFGF_NONE),
CFG_STR("memory_used_method", "classical", CFGF_NONE),
+ CFG_STR("unit", "auto", CFGF_NONE),
+ CFG_INT("decimals", 1, CFGF_NONE),
CFG_CUSTOM_ALIGN_OPT,
CFG_CUSTOM_COLOR_OPTS,
CFG_CUSTOM_MIN_WIDTH_OPT,
@@ -763,7 +765,7 @@ int main(int argc, char *argv[]) {
CASE_SEC("memory") {
SEC_OPEN_MAP("memory");
- print_memory(json_gen, buffer, cfg_getstr(sec, "format"), cfg_getstr(sec, "format_degraded"), cfg_getstr(sec, "threshold_degraded"), cfg_getstr(sec, "threshold_critical"), cfg_getstr(sec, "memory_used_method"));
+ print_memory(json_gen, buffer, cfg_getstr(sec, "format"), cfg_getstr(sec, "format_degraded"), cfg_getstr(sec, "threshold_degraded"), cfg_getstr(sec, "threshold_critical"), cfg_getstr(sec, "memory_used_method"), cfg_getstr(sec, "unit"), cfg_getint(sec, "decimals"));
SEC_CLOSE_MAP;
}