X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/eb8cec907a50f3fd6df4b14ae10b910444017f92..d3e9bd968c62d75b149f9eb4720454282eb3a18f:/widgets/maildir.lua diff --git a/widgets/maildir.lua b/widgets/maildir.lua index 00ab771..d460881 100644 --- a/widgets/maildir.lua +++ b/widgets/maildir.lua @@ -24,14 +24,14 @@ local setmetatable = setmetatable -- lain.widgets.maildir local maildir = {} -function worker(args) +local function worker(args) local args = args or {} local timeout = args.timeout or 60 local mailpath = args.mailpath or os.getenv("HOME") .. "/Mail" local ignore_boxes = args.ignore_boxes or {} local settings = args.settings or function() end - widget = wibox.widget.textbox('') + maildir.widget = wibox.widget.textbox('') function update() -- Find pathes to mailboxes. @@ -84,12 +84,12 @@ function worker(args) end end + widget = maildir.widget settings() end newtimer(mailpath, timeout, update, true) - - return widget + return maildir.widget end return setmetatable(maildir, { __call = function(_, ...) return worker(...) end })