Move dev widgets to the dedicated folder

This commit is contained in:
Evgeny
2024-09-12 09:11:40 +03:00
parent d063132df2
commit 11a8cf2ad6
7 changed files with 70 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
-- 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