aboutsummaryrefslogtreecommitdiff
path: root/fs.lua
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2010-03-10 01:57:25 +0100
committerAdrian C. (anrxc) <anrxc@sysphere.org>2010-03-10 01:57:25 +0100
commitabacd771bd3a2398aa482e1f2ad99fa74ca1582d (patch)
treef5c516a3d3e880e29c21792241a5c2a3b836529b /fs.lua
parent94e7ed1beb1a69e896e322ed3c726a91ee60d88b (diff)
downloadvicious-legacy-abacd771bd3a2398aa482e1f2ad99fa74ca1582d.tar.xz
fs: include available space in percent, requested by Jon
Format string and key example: "${/home avail_p}"
Diffstat (limited to 'fs.lua')
-rw-r--r--fs.lua4
1 files changed, 3 insertions, 1 deletions
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()