aboutsummaryrefslogtreecommitdiff
path: root/cpu.lua
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2009-08-05 21:50:41 +0200
committerAdrian C. (anrxc) <anrxc@sysphere.org>2009-08-05 21:50:41 +0200
commit4c74de711f564d26ebefef7f9422289bd76ef8c2 (patch)
tree404eb00b19214c8455dc1d0397d34353b895efce /cpu.lua
parent2d4efa6893a582a7bc6a15b4840a116c0547b534 (diff)
downloadvicious-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.lua17
1 files changed, 1 insertions, 16 deletions
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
-- }}}