Merge branch 'master' of https://github.com/zobnin/aiolauncher_scripts
This commit is contained in:
36
community/public-ip-search.lua
Normal file
36
community/public-ip-search.lua
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
-- name = "Public IP"
|
||||||
|
-- description = "Shows your public IP in the search bar"
|
||||||
|
-- data_source = "ipify.org"
|
||||||
|
-- type = "search"
|
||||||
|
-- author = "Sriram SV"
|
||||||
|
-- version = "1.0"
|
||||||
|
|
||||||
|
local md_color = require "md_colors"
|
||||||
|
local blue = md_colors.blue_500
|
||||||
|
local red = md_colors.red_500
|
||||||
|
|
||||||
|
local ip = ""
|
||||||
|
function on_search(input)
|
||||||
|
if input:lower():find(string.lower("^ip$")) then
|
||||||
|
get_ip()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function on_click()
|
||||||
|
system:copy_to_clipboard(ip)
|
||||||
|
end
|
||||||
|
|
||||||
|
function get_ip()
|
||||||
|
http:get("https://api.ipify.org")
|
||||||
|
end
|
||||||
|
|
||||||
|
function on_network_result(result,code)
|
||||||
|
if code >= 200 and code < 300 then
|
||||||
|
ip = result
|
||||||
|
search:show({result},{blue})
|
||||||
|
else
|
||||||
|
search:show({"Server Error"},{red})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
34
community/qr-code.lua
Normal file
34
community/qr-code.lua
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
-- name = "QR Code"
|
||||||
|
-- description = "Turn any text or url into QR code"
|
||||||
|
-- data_source = "https://api.qrserver.com/v1/"
|
||||||
|
-- type = "search"
|
||||||
|
-- author = "Sriram SV"
|
||||||
|
-- version = "1.0"
|
||||||
|
|
||||||
|
|
||||||
|
qr_code_url = "https://api.qrserver.com/v1"
|
||||||
|
text_from = ""
|
||||||
|
text_to = ""
|
||||||
|
|
||||||
|
local md_color = require "md_colors"
|
||||||
|
|
||||||
|
-- constants
|
||||||
|
local blue = md_colors.blue_500
|
||||||
|
|
||||||
|
|
||||||
|
function on_search(input)
|
||||||
|
text_to = ""
|
||||||
|
text_from = input
|
||||||
|
search:show({input},{blue})
|
||||||
|
end
|
||||||
|
|
||||||
|
function on_click()
|
||||||
|
if text_to == "" then
|
||||||
|
get_qr_code(text_from)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function get_qr_code(text)
|
||||||
|
url = qr_code_url.."/create-qr-code/?size=150x150&data="..text
|
||||||
|
system:open_browser(url)
|
||||||
|
end
|
||||||
29
community/share-menu.lua
Normal file
29
community/share-menu.lua
Normal 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
|
||||||
|
|
||||||
Reference in New Issue
Block a user