aboutsummaryrefslogtreecommitdiff
path: root/entropy.lua
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2009-08-01 23:11:41 +0200
committerAdrian C. (anrxc) <anrxc@sysphere.org>2009-08-01 23:11:41 +0200
commit418151f57ebe56b84e35169e73912fe244871db5 (patch)
treeb25f130d73deeb91d8dcb9bb8b728b3af6aaba05 /entropy.lua
parent1630b786d4028a8075695c026391ee80cc9b9aca (diff)
downloadvicious-legacy-418151f57ebe56b84e35169e73912fe244871db5.tar.xz
Make all widgets return their worker functions when called.
Diffstat (limited to 'entropy.lua')
-rw-r--r--entropy.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/entropy.lua b/entropy.lua
index 43bdb80..a41fb38 100644
--- a/entropy.lua
+++ b/entropy.lua
@@ -5,6 +5,7 @@
-- {{{ Grab environment
local io = { open = io.open }
+local setmetatable = setmetatable
local math = { floor = math.floor }
local string = { format = string.format }
-- }}}
@@ -35,3 +36,5 @@ function worker(format, poolsize)
return {ent_avail, ent_avail_percent}
end
-- }}}
+
+setmetatable(_M, { __call = function(_, ...) return worker(...) end })