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