From 418151f57ebe56b84e35169e73912fe244871db5 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Sat, 1 Aug 2009 23:11:41 +0200 Subject: Make all widgets return their worker functions when called. --- cpu.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cpu.lua') diff --git a/cpu.lua b/cpu.lua index 5112253..7f0a006 100644 --- a/cpu.lua +++ b/cpu.lua @@ -8,6 +8,7 @@ local type = type local pairs = pairs local ipairs = ipairs local io = { open = io.open } +local setmetatable = setmetatable local math = { floor = math.floor } local table = { insert = table.insert } local helpers = require("vicious.helpers") @@ -93,3 +94,5 @@ function worker(format, padding) return cpu_usage end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) -- cgit v1.2.3