Files
aiolauncher_scripts/shell-widget.lua
2021-07-30 18:51:37 +03:00

30 lines
489 B
Lua

-- name = "Shell widget"
-- description = "Shows the result of executing console commands"
-- type = "widget"
-- author = "Evgeny Zobnin (zobnin@gmail.com)"
-- version = "1.0"
currentOutput = "empty"
function onResume()
redraw()
end
function redraw()
ui:showText(currentOutput)
end
function onClick(idx)
ui:showEditDialog("Enter command")
end
function onDialogAction(text)
system:exec(text)
end
function onShellResult(text)
currentOutput = text
redraw()
end