Files
aiolauncher_scripts/samples/notify_sample.lua
2025-04-23 19:32:49 +08:00

20 lines
391 B
Lua

-- This is an example of a widget that,
-- when a notification is added or removed,
-- simply reads the current notifications and refreshes the screen.
function on_resume()
refresh()
end
function on_notifications_updated()
refresh()
end
function refresh()
local titles = map(
function(it) return it.title end,
notify:list()
)
ui:show_lines(titles)
end