Fix warnings

This commit is contained in:
Augusto Gunsch 2022-01-23 22:05:53 -03:00
parent 69aac8cae6
commit c7250a0a3d
1 changed files with 3 additions and 10 deletions

View File

@ -14,13 +14,6 @@ local naughty = require("naughty")
local cmus_widget = {}
local function show_warning(message)
naughty.notify{
preset = naughty.config.presets.critical,
title = "Cmus Widget",
text = message}
end
local function worker(user_args)
local args = user_args or {}
@ -54,7 +47,7 @@ local function worker(user_args)
end
}
function update_widget(widget, stdout, _, _, code)
local function update_widget(widget, stdout, _, _, code)
if code == 0 then
local cmus_info = {}
@ -64,12 +57,12 @@ local function worker(user_args)
if key and val then
cmus_info[key] = val
else
local key, val = string.match(s, "^set (%a+) (.+)$")
key, val = string.match(s, "^set (%a+) (.+)$")
if key and val then
cmus_info[key] = val
else
local key, val = string.match(s, "^(%a+) (.+)$")
key, val = string.match(s, "^(%a+) (.+)$")
if key and val then
cmus_info[key] = val
end