fix(nix-monitor): fix some warnings
This commit is contained in:
@@ -11,16 +11,14 @@ function getState(key)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function displayWidget(glyph: string, text: string, color: string?)
|
function displayWidget(glyph: string, text: string, color: string?)
|
||||||
if color == nil then
|
local _color = color or "on_surface"
|
||||||
color = "on_surface"
|
|
||||||
end
|
|
||||||
|
|
||||||
if cfg("colorize_text") then
|
if cfg("colorize_text") then
|
||||||
barWidget.setColor(color)
|
barWidget.setColor(_color)
|
||||||
end
|
end
|
||||||
|
|
||||||
if cfg("colorize_glyph") then
|
if cfg("colorize_glyph") then
|
||||||
barWidget.setGlyphColor(color)
|
barWidget.setGlyphColor(_color)
|
||||||
end
|
end
|
||||||
|
|
||||||
if cfg("show_glyph") then
|
if cfg("show_glyph") then
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ function onCancelClicked()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function onUpdateClicked()
|
function onUpdateClicked()
|
||||||
command = cfg("update_command")
|
local command = cfg("update_command")
|
||||||
if command == "" then
|
if command == "" then
|
||||||
noctalia.notifyError(tr("notification.update_command_is_empty"))
|
noctalia.notifyError(tr("notification.update_command_is_empty"))
|
||||||
return
|
return
|
||||||
@@ -249,7 +249,7 @@ function onUpdateClicked()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function onCleanClicked()
|
function onCleanClicked()
|
||||||
command = cfg("clean_command")
|
local command = cfg("clean_command")
|
||||||
if command == "" then
|
if command == "" then
|
||||||
noctalia.notifyError(tr("notification.clean_command_is_empty"))
|
noctalia.notifyError(tr("notification.clean_command_is_empty"))
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user