X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/586c54a25750fd90d91c15ac8eb818b2613de582..1d2f4a102ed4fe4c536a76d03b91c19001f48ec6:/widget/contrib/moc.lua?ds=inline diff --git a/widget/contrib/moc.lua b/widget/contrib/moc.lua index f841e31..027cec3 100644 --- a/widget/contrib/moc.lua +++ b/widget/contrib/moc.lua @@ -1,9 +1,8 @@ - --[[ - - Licensed under GNU General Public License v2 - * (c) 2014, anticlockwise - + + Licensed under GNU General Public License v2 + * (c) 2014, anticlockwise + --]] local helpers = require("lain.helpers") @@ -15,13 +14,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 +29,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 +94,4 @@ local function factory(args) return moc end -return setmetatable(moc, { __call = function(_, ...) return factory(...) end }) +return factory