From 4c74de711f564d26ebefef7f9422289bd76ef8c2 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Wed, 5 Aug 2009 21:50:41 +0200 Subject: 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. --- cpu.lua | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'cpu.lua') diff --git a/cpu.lua b/cpu.lua index 7f0a006..c208d2c 100644 --- a/cpu.lua +++ b/cpu.lua @@ -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 -- }}} -- cgit v1.2.3