X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/586c54a25750fd90d91c15ac8eb818b2613de582..6d7d6aad5409b580437b12d7c498aa0c3d5ae5ac:/widget/contrib/moc.lua diff --git a/widget/contrib/moc.lua b/widget/contrib/moc.lua index f841e31..83d8aaf 100644 --- a/widget/contrib/moc.lua +++ b/widget/contrib/moc.lua @@ -15,13 +15,12 @@ local wibox = require("wibox") local os = { getenv = os.getenv } local string = { format = string.format, gmatch = string.gmatch } -local setmetatable = setmetatable -- MOC audio player -- lain.widget.contrib.moc -local moc = {} local function factory(args) + local moc = { widget = wibox.widget.textbox() } local args = args or {} local timeout = args.timeout or 2 local music_dir = args.music_dir or os.getenv("HOME") .. "/Music" @@ -31,8 +30,6 @@ local function factory(args) local followtag = args.followtag or false local settings = args.settings or function() end - moc.widget = wibox.widget.textbox() - moc_notification_preset = { title = "Now playing", timeout = 6 } helpers.set_map("current moc track", nil) @@ -98,4 +95,4 @@ local function factory(args) return moc end -return setmetatable(moc, { __call = function(_, ...) return factory(...) end }) +return factory