diff options
author | Joerg T. (Mic92) <jthalheim@gmail.com> | 2011-08-18 19:43:09 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2011-08-18 20:39:22 +0200 |
commit | f1844decefb931f5317fa9cadbaf65dfcdd7d829 (patch) | |
tree | d62c91bdc965878ede5bf000dbf3d6bfa02130a5 /init.lua | |
parent | b11d251ef0326a67dee5e53efa8cd3543cea01e1 (diff) | |
download | vicious-legacy-f1844decefb931f5317fa9cadbaf65dfcdd7d829.tar.xz |
Allocate reg table with all values in one shot
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -141,20 +141,20 @@ end -- {{{ Global functions -- {{{ Register a widget function register(widget, wtype, format, timer, warg) - local reg = {} local widget = widget - - -- Set properties - reg.wtype = wtype - reg.format = format - reg.timer = timer - reg.warg = warg - reg.widget = widget - - -- Update function - reg.update = function () - update(widget, reg) - end + local reg = { + -- Set properties + wtype = wtype, + format = format, + timer = timer, + warg = warg, + widget = widget, + + -- Update function + update = function () + update(widget, reg) + end, + } -- Default to 2s timer if reg.timer == nil then |