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. --- mem.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mem.lua') diff --git a/mem.lua b/mem.lua index 818e501..7183aa7 100644 --- a/mem.lua +++ b/mem.lua @@ -7,6 +7,7 @@ local type = type local tonumber = tonumber local io = { open = io.open } +local setmetatable = setmetatable local math = { floor = math.floor } local helpers = require("vicious.helpers") -- }}} @@ -74,3 +75,5 @@ function worker(format, padding) swap_usepercent, swap_inuse, swap_total, swap_free} end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) -- cgit v1.2.3