diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-08-05 21:50:41 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-08-05 21:50:41 +0200 |
commit | 4c74de711f564d26ebefef7f9422289bd76ef8c2 (patch) | |
tree | 404eb00b19214c8455dc1d0397d34353b895efce /fs.lua | |
parent | 2d4efa6893a582a7bc6a15b4840a116c0547b534 (diff) | |
download | vicious-legacy-4c74de711f564d26ebefef7f9422289bd76ef8c2.tar.xz |
Padding removed, along with deprecated helper functions.
If you have any use for it then continue using an older vicious tag,
or keep maintaining it in your local vicious copy.
Diffstat (limited to 'fs.lua')
-rw-r--r-- | fs.lua | 18 |
1 files changed, 1 insertions, 17 deletions
@@ -4,10 +4,8 @@ ---------------------------------------------------------- -- {{{ Grab environment -local type = type local io = { popen = io.popen } local setmetatable = setmetatable -local helpers = require("vicious.helpers") -- }}} @@ -16,7 +14,7 @@ module("vicious.fs") -- {{{ Filesystem widget type -function worker(format, padding) +function worker(format) -- Get data from df local f = io.popen("df -hP") local args = {} @@ -30,20 +28,6 @@ function worker(format, padding) -- Instead match all at once, including network file systems line:match("^[%w/-:%.]+[%s]+([%d%.]+)[%a]?[%s]+([%d%.]+)[%a]?[%s]+([%d%.]+)[%a]?[%s]+([%d]+)%%[%s]+([-/%w]+)$") - if padding then - if type(padding) == "table" then - size = helpers.padd(size, padding[1]) - used = helpers.padd(used, padding[2]) - avail = helpers.padd(avail, padding[3]) - usep = helpers.padd(usep, padding[4]) - else - size = helpers.padd(size, padding) - used = helpers.padd(used, padding) - avail = helpers.padd(avail, padding) - usep = helpers.padd(usep, padding) - end - end - args["{"..mount.." size}"] = size args["{"..mount.." used}"] = used args["{"..mount.." avail}"] = avail |