summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorMK13 <marius@kleberonline.de>2019-10-26 15:32:32 +0200
committerMK13 <marius@kleberonline.de>2019-10-26 15:32:32 +0200
commit572c96d63ed41bfc83d7378454f3ae4505ad9601 (patch)
tree7398d356bd2295e1e0dd1a8156266a1750db8bc4 /man
parent3d6b1b576b3c1acd6d2932da454171cfd8e22821 (diff)
Introduce memory options 'unit' and 'decimals'
Previously the format placeholders were auto-converted to the maximum possible unit, e.g. /proc/meminfo reports MemTotal of 16307104kB which will get converted to 15.6GiB. It is now possible to specifiy the target unit, e.g. Mi, which will be used for the conversion - in the example it would lead to 15924.9MiB. The resulting number can now be further formatted via the decimal option. It allows to specify the number of decimals to use, e.g. 15.6GiB vs. 15GiB or 15924.9MiB vs. 15925MiB.
Diffstat (limited to 'man')
-rw-r--r--man/i3status.man13
1 files changed, 13 insertions, 0 deletions
diff --git a/man/i3status.man b/man/i3status.man
index 9283722..4cfa7d8 100644
--- a/man/i3status.man
+++ b/man/i3status.man
@@ -463,6 +463,15 @@ If the +format_degraded+ parameter is given and either the critical or the
degraded threshold applies, +format_degraded+ will get used as format string.
It acts equivalently to +format+.
+It's also possible to define the unit for the various format placeholders. As
++/proc/meminfo+ returns the memory in kB they will be converted to the given
+unit. If no unit is given or the +auto+ option is used, the conversion will
+select the maximum possible unit.
+
+As the converted format placeholder will be a decimal number, the number of
+decimals can be configured via the +decimals+ option. If no such option is
+given the converted format placeholder will have one decimal.
+
As Linux' meminfo doesn't expose the overall memory in use, there are multiple
methods to distinguish the actually used memory.
@@ -476,6 +485,10 @@ methods to distinguish the actually used memory.
*Example format*: +%percentage_used used, %percentage_free free, %percentage_shared shared+
+*Example unit*: auto, Ki, Mi, Gi, Ti
+
+*Example decimals*: 0, 1, 2, 3
+
*Example threshold_degraded*: +10%+
*Example threshold_critical*: +5%+