Fix luacheck issues

This commit is contained in:
streetturtle 2024-11-09 13:57:48 -05:00
parent ca4ba9d24c
commit 7eb3b2a453
2 changed files with 4 additions and 5 deletions

View File

@ -203,7 +203,7 @@ local function worker(user_args)
border_color = calendar_themes[theme].border,
widget = cal
}
local auto_hide_timer = gears.timer({
timeout = user_args.timeout or 2,
single_shot = true,
@ -213,7 +213,7 @@ local function worker(user_args)
})
popup:connect_signal("mouse::leave", function()
if user_args.auto_hide then
if user_args.auto_hide then
auto_hide_timer:again()
end
end)

View File

@ -7,7 +7,6 @@
-------------------------------------------------
local awful = require('awful')
local beautiful = require('beautiful')
local watch = require('awful.widget.watch')
local wibox = require('wibox')
local gears = require('gears')
@ -44,7 +43,7 @@ function playerctl:watch(timeout, callback, widget)
self.watch_params = { timeout = timeout, callback = callback, widget = widget }
local cb = function(widget, stdout, _, _, _)
local cb = function(cb_widget, stdout, _, _, _)
local words = gears.string.split(stdout, ';')
local position, length, progress = tonumber(words[5]), tonumber(words[6])
@ -68,7 +67,7 @@ function playerctl:watch(timeout, callback, widget)
metadata.year = string.sub(words[8], 0, 4)
end
callback(widget, metadata)
callback(cb_widget, metadata)
end
_, self.timer = awful.widget.watch(cmd, timeout, cb, widget)