X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/8d37b9a1e4521a220f20ce2e1414f656aa3a5015..b9966b88effe133345227c6793446f7e99620fa9:/widgets/maildir.lua?ds=inline diff --git a/widgets/maildir.lua b/widgets/maildir.lua index 00ab771..5cb6840 100644 --- a/widgets/maildir.lua +++ b/widgets/maildir.lua @@ -1,4 +1,3 @@ - --[[ Licensed under GNU General Public License v2 @@ -24,14 +23,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 +83,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 })