diff --git a/init.lua b/init.lua index d8a293a..074d883 100644 --- a/init.lua +++ b/init.lua @@ -352,5 +352,16 @@ function vicious.call_async(wtype, format, warg, callback) end -- }}} +-- {{{ Change the timer of a registered widget. +function vicious.change_timer(reg, timer_) + if not reg then return end + if timer_ ~= reg.timer then + vicious.unregister(nil, true, reg) + reg.timer = timer_ + regregister(reg) + end +end +-- }}} + return vicious -- }}}