X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/eb8cec907a50f3fd6df4b14ae10b910444017f92..0345cc3576955b37a981ee8f38d11e99c82dbb31:/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 })