From: copycat-killer Date: Fri, 27 Jan 2017 13:35:27 +0000 (+0100) Subject: wiki enhanced X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/ae4b9b272802c0690b711644508d63a538a3e1cd?ds=inline;hp=--cc wiki enhanced --- ae4b9b272802c0690b711644508d63a538a3e1cd 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 }) diff --git a/widgets/cpu.lua b/widgets/cpu.lua index 79f99af..076b692 100644 --- a/widgets/cpu.lua +++ b/widgets/cpu.lua @@ -26,7 +26,7 @@ local function worker(args) cpu.widget = wibox.widget.textbox() - function update() + function cpu.update() -- Read the amount of time the CPUs have spent performing -- different kinds of work. Read the first line of /proc/stat -- which is the sum of all CPUs. @@ -74,7 +74,7 @@ local function worker(args) settings() end - helpers.newtimer("cpu", timeout, update) + helpers.newtimer("cpu", timeout, cpu.update) return cpu end diff --git a/widgets/mem.lua b/widgets/mem.lua index 2b414ef..7b717ef 100644 --- a/widgets/mem.lua +++ b/widgets/mem.lua @@ -25,7 +25,7 @@ local function worker(args) mem.widget = wibox.widget.textbox() - function update() + function mem.update() mem_now = {} for line in lines("/proc/meminfo") do for k, v in gmatch(line, "([%a]+):[%s]+([%d]+).+") do @@ -48,7 +48,7 @@ local function worker(args) settings() end - helpers.newtimer("mem", timeout, update) + helpers.newtimer("mem", timeout, mem.update) return mem end diff --git a/widgets/net.lua b/widgets/net.lua index 1dfef43..223f3af 100644 --- a/widgets/net.lua +++ b/widgets/net.lua @@ -97,12 +97,10 @@ local function worker(args) helpers.set_map(dev, true) end - -- Old api compatibility net_now.carrier = dev_now.carrier net_now.state = dev_now.state - -- And new api net_now.devices[dev] = dev_now - -- With the new api new_now.sent and net_now.received will be the + -- new_now.sent and net_now.received will be the -- totals across all specified devices end diff --git a/widgets/sysload.lua b/widgets/sysload.lua index 49f640c..df9dbea 100644 --- a/widgets/sysload.lua +++ b/widgets/sysload.lua @@ -24,7 +24,7 @@ local function worker(args) sysload.widget = wibox.widget.textbox() - function update() + function sysload.update() local f = io.open("/proc/loadavg") local ret = f:read("*all") f:close() @@ -35,7 +35,7 @@ local function worker(args) settings() end - helpers.newtimer("sysload", timeout, update) + helpers.newtimer("sysload", timeout, sysload.update) return sysload end diff --git a/widgets/temp.lua b/widgets/temp.lua index 9f41fdb..1c7e86c 100644 --- a/widgets/temp.lua +++ b/widgets/temp.lua @@ -24,7 +24,7 @@ local function worker(args) temp.widget = wibox.widget.textbox() - function update() + function temp.update() local f = io.open(tempfile) if f then coretemp_now = tonumber(f:read("*all")) / 1000 @@ -37,7 +37,7 @@ local function worker(args) settings() end - helpers.newtimer("coretemp", timeout, update) + helpers.newtimer("coretemp", timeout, temp.update) return temp end diff --git a/wiki b/wiki index ed824be..425169b 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit ed824beb75262f9f78e49baa6e1a591220ca5249 +Subproject commit 425169b35b105e5a240997ff8f5aa12bec6099cb