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 /cpu.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 'cpu.lua')
-rw-r--r-- | cpu.lua | 17 |
1 files changed, 1 insertions, 16 deletions
@@ -4,14 +4,11 @@ ---------------------------------------------------------- -- {{{ Grab environment -local type = type -local pairs = pairs local ipairs = ipairs local io = { open = io.open } local setmetatable = setmetatable local math = { floor = math.floor } local table = { insert = table.insert } -local helpers = require("vicious.helpers") -- }}} @@ -25,7 +22,7 @@ local cpu_total = {} local cpu_active = {} -- {{{ CPU widget type -function worker(format, padding) +function worker(format) -- Get /proc/stat local f = io.open("/proc/stat") local cpu_lines = {} @@ -79,18 +76,6 @@ function worker(format, padding) cpu_active[i] = active_new[i] end - if padding ~= nil then - for k, v in pairs(cpu_usage) do - if type(padding) == "table" then - p = padding[k] - else - p = padding - end - - cpu_usage[k] = helpers.padd(cpu_usage[k], p) - end - end - return cpu_usage end -- }}} |