X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/752ba7fa3d8928dfc19c59dbf3c6d167c4ae3bc9..229d2545dd399b52c6128a823657c6266fbbe8a9:/widgets/cpu.lua diff --git a/widgets/cpu.lua b/widgets/cpu.lua index f61e2cc..79f99af 100644 --- a/widgets/cpu.lua +++ b/widgets/cpu.lua @@ -17,14 +17,14 @@ local setmetatable = setmetatable -- CPU usage -- lain.widgets.cpu -local cpu = helpers.make_widget_textbox() +local cpu = { core = {} } local function worker(args) local args = args or {} local timeout = args.timeout or 2 local settings = args.settings or function() end - cpu.core = {} + cpu.widget = wibox.widget.textbox() function update() -- Read the amount of time the CPUs have spent performing @@ -67,9 +67,9 @@ local function worker(args) end end - widget = cpu.widget cpu_now = cpu.core cpu_now.usage = cpu_now[0].usage + widget = cpu.widget settings() end