X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/6cce5b6fe11fe8c69b08140d645c604fef59e42a..5af7a8c1726862f770b84e46cfa0eee064eac0fb:/widgets/cpu.lua diff --git a/widgets/cpu.lua b/widgets/cpu.lua index c294566..f7fb087 100644 --- a/widgets/cpu.lua +++ b/widgets/cpu.lua @@ -25,7 +25,7 @@ local function worker(args) local timeout = args.timeout or 2 local settings = args.settings or function() end - cpu.widget = wibox.widget.textbox('') + cpu.widget = wibox.widget.textbox() function update() -- Read the amount of time the CPUs have spent performing @@ -77,7 +77,7 @@ local function worker(args) newtimer("cpu", timeout, update) - return cpu.widget + return setmetatable(cpu, { __index = cpu.widget }) end return setmetatable(cpu, { __call = function(_, ...) return worker(...) end })