X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/229d2545dd399b52c6128a823657c6266fbbe8a9..9ec9f475c886a8fba0532cb3d1b47190c01352fa:/widgets/contrib/tpbat/init.lua?ds=sidebyside 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 })