diff --git a/README b/README index 5f9ed2d..cd8950e 100644 --- a/README +++ b/README @@ -217,7 +217,7 @@ vicious.widgets.fs systems, only local file systems are included by default - returns a table with string keys, using mount points as a base: {/ size_mb}, {/ size_gb}, {/ used_mb}, {/ used_gb}, {/ used_p}, - {/ avail_mb}, {/ avail_gb}, {/home size_mb} etc. + {/ avail_mb}, {/ avail_gb}, {/ avail_p}, {/home size_mb} etc. vicious.widgets.dio - provides I/O statistics for requested storage devices diff --git a/fs.lua b/fs.lua index f26038a..27934c4 100644 --- a/fs.lua +++ b/fs.lua @@ -38,7 +38,9 @@ local function worker(format, nfs) helpers.uformat(fs_info, m .. " size", s, unit) helpers.uformat(fs_info, m .. " used", u, unit) helpers.uformat(fs_info, m .. " avail", a, unit) - fs_info["{" .. m .. " used_p}"] = tonumber(p) + + fs_info["{" .. m .. " used_p}"] = tonumber(p) + fs_info["{" .. m .. " avail_p}"] = 100 - tonumber(p) end end f:close()