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

23
dev/aiocolors-widget.lua Normal file
View File

@@ -0,0 +1,23 @@
-- name = "AΙΟ colors"
-- type = "widget"
-- description = "Shows colors returned by aio:colors() function"
--foldable = "true"
-- author = "Theodor Galanis"
-- version = "1"
function on_resume()
local colors = aio:colors()
local colors_strings = stringify_table(colors)
ui:show_lines(colors_strings)
end
function stringify_table(tab)
local new_tab = {}
for k,v in pairs(tab) do
table.insert(new_tab, k..": "..tostring(v))
end
return new_tab
end

View File

@@ -0,0 +1,23 @@
-- name = "AΙΟ widgets list"
-- type = "widget"
-- description = "Shows widgets returned by aio:available_widgets() function"
--foldable = "true"
-- author = "Theodor Galanis"
-- version = "1"
function on_resume()
actions = aio:available_widgets()
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

2
env
View File

@@ -1,3 +1,3 @@
REPOS="main ru samples community"
REPOS="main ru samples community dev"
SCRIPTS_DIR="/sdcard/Android/data/ru.execbit.aiolauncher/files/"