X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/e0d4a89435d68714c0cee849625e0b14edca3d1c..176f4d75e1749df77aa8929cb79b4865c2fddaa5:/widgets/contrib/gpmdp.lua diff --git a/widgets/contrib/gpmdp.lua b/widgets/contrib/gpmdp.lua index 21776ac..37da43d 100644 --- a/widgets/contrib/gpmdp.lua +++ b/widgets/contrib/gpmdp.lua @@ -19,7 +19,7 @@ local setmetatable = setmetatable -- Google Play Music Desktop infos -- lain.widget.contrib.gpmdp -local gpmdp = {} +local gpmdp = helpers.make_widget_textbox() local function worker(args) local args = args or {} @@ -30,8 +30,6 @@ local function worker(args) os.getenv("HOME") .. "/.config/Google Play Music Desktop Player/json_store/playback.json" local settings = args.settings or function() end - gpmdp.widget = wibox.widget.textbox('') - gpmdp_notification_preset = { title = "Now playing", timeout = 6 @@ -86,7 +84,7 @@ local function worker(args) gpmdp.timer = helpers.newtimer("gpmdp", timeout, gpmdp.update, true, true) - return setmetatable(gpmdp, { __index = gpmdp.widget }) + return gpmdp end return setmetatable(gpmdp, { __call = function(_, ...) return worker(...) end })