From: copycat-killer Date: Sat, 19 Nov 2016 09:30:58 +0000 (+0100) Subject: bat: make update() available; #236 X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/ce12475edea7c76fea7f7e020d83d340aa8f1d7c?ds=sidebyside bat: make update() available; #236 --- diff --git a/lain-git.rockspec b/lain-git.rockspec index 04dfe34..b8d7abb 100644 --- a/lain-git.rockspec +++ b/lain-git.rockspec @@ -24,5 +24,5 @@ dependencies = { supported_platforms = { "linux" } build = { type = "builtin", - modules = { lain = "init.lua" }, + modules = { lain = "init.lua" } } diff --git a/widgets/bat.lua b/widgets/bat.lua index 991885a..f63b1fa 100644 --- a/widgets/bat.lua +++ b/widgets/bat.lua @@ -68,7 +68,7 @@ local function worker(args) bat_now.n_perc[i] = 0 end - function update() + function bat.update() local sum_rate_current = 0 local sum_rate_voltage = 0 local sum_rate_power = 0 @@ -165,7 +165,7 @@ local function worker(args) end end - newtimer(battery, timeout, update) + newtimer(battery, timeout, bat.update) return setmetatable(bat, { __index = bat.widget }) end