From: Luke Bonham Date: Sun, 25 Oct 2015 09:02:40 +0000 (+0100) Subject: forgot to refix #141 X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/2b8a2bc2ae974072cb48e293db0c05e9517cff06?ds=inline;hp=--cc forgot to refix #141 --- 2b8a2bc2ae974072cb48e293db0c05e9517cff06 diff --git a/widgets/bat.lua b/widgets/bat.lua index 626239b..61828ec 100644 --- a/widgets/bat.lua +++ b/widgets/bat.lua @@ -21,9 +21,9 @@ local setmetatable = setmetatable -- Battery infos -- lain.widgets.bat -local bat = {} local function worker(args) + local bat = {} local args = args or {} local timeout = args.timeout or 30 local battery = args.battery or "BAT0" @@ -143,7 +143,7 @@ local function worker(args) newtimer(battery, timeout, update) - return bat.widget + return setmetatable(bat, { __index = bat.widget }) end -return setmetatable(bat, { __call = function(_, ...) return worker(...) end }) +return setmetatable({}, { __call = function(_, ...) return worker(...) end })