Files
aiolauncher_scripts/dev/aioactionslist-widget.lua
2024-09-12 09:11:40 +03:00

23 lines
552 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- name = "AΙΟ actions list"
-- type = "widget"
-- description = "Shows actions returned by aio:actions() function"
--foldable = "true"
-- author = "Theodor Galanis"
-- version = "1"
function on_resume()
actions = aio:actions()
local labels = ""
labels = map(actions, function(it) return it.label end)
names = map(actions, function(it) return it.name end)
ui:show_lines(names, labels)
end
function map(tbl, f)
local ret = {}
for k,v in pairs(tbl) do
ret[k] = f(v)
end
return ret
end