aboutsummaryrefslogtreecommitdiff
path: root/cpu.lua
diff options
context:
space:
mode:
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
-- }}}