X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/229d2545dd399b52c6128a823657c6266fbbe8a9..33223f2816470636c45b280c77b9da57d5fb9d4b:/widgets/contrib/tpbat/init.lua?ds=inline diff --git a/widgets/contrib/tpbat/init.lua b/widgets/contrib/tpbat/init.lua index e65cde8..20a10f4 100644 --- a/widgets/contrib/tpbat/init.lua +++ b/widgets/contrib/tpbat/init.lua @@ -108,7 +108,7 @@ function tpbat.register(args) }) end - function update() + function tpbat.update() bat_now = { status = "Not present", perc = "N/A", @@ -151,12 +151,12 @@ function tpbat.register(args) settings() end - newtimer("tpbat-" .. bat.name, timeout, update) + newtimer("tpbat-" .. bat.name, timeout, tpbat.update) widget:connect_signal('mouse::enter', function () tpbat.show() end) widget:connect_signal('mouse::leave', function () tpbat.hide() end) - return tpbat.widget + return tpbat end return setmetatable(tpbat, { __call = function(_, ...) return tpbat.register(...) end })