Move scripts to community folder

This commit is contained in:
sriramsv
2022-08-26 22:27:22 -07:00
parent a5aae9185b
commit e6973abdae
2 changed files with 63 additions and 0 deletions

29
community/share-menu.lua Normal file
View File

@@ -0,0 +1,29 @@
-- name = "Share Text"
-- description = "Share text with other apps"
-- data_source = "internal"
-- type = "search"
-- author = "Sriram SV"
-- version = "1.0"
local md_color = require "md_colors"
-- constants
local blue = md_colors.blue_500
local red = md_colors.red_500
-- variables
text_from = ""
text_to=""
function on_search(input)
text_from = input
text_to = ""
search:show({"Share \""..input.."\""}, {blue})
end
function on_click()
if text_to == "" then
system:share_text(text_from)
end
end