From 1f6359e3065ebbbbadf38f196b2ac5a27aff3aa4 Mon Sep 17 00:00:00 2001 From: Beniamin Kalinowski Date: Sat, 20 Jan 2018 14:05:21 +0900 Subject: [PATCH] More concise default timer settings. --- init.lua | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index a909dec..ecee309 100644 --- a/init.lua +++ b/init.lua @@ -158,26 +158,20 @@ end -- {{{ Global functions -- {{{ Register a widget function vicious.register(widget, wtype, format, timer, warg) - local widget = widget local reg = { -- Set properties wtype = wtype, lock = false, format = format, - timer = timer, + timer = timer or 2, warg = warg, widget = widget, } -- Set functions - reg.update = function () + function reg.update() update(widget, reg) end - -- Default to 2s timer - if reg.timer == nil then - reg.timer = 2 - end - -- Register a reg object regregister(reg)