Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix luacheck issues #460

Merged
merged 2 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions calendar-widget/calendar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions mpris-widget/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down Expand Up @@ -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])
Expand All @@ -68,10 +67,11 @@ 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)
local _, timer = awful.widget.watch(cmd, timeout, cb, widget)
self.timer = timer
end

function playerctl:toggle() awful.spawn(self:cmd('play-pause'), false) end
Expand Down
Loading