From b0287dcea76bebf4e7811d0b1d284c73ea487294 Mon Sep 17 00:00:00 2001 From: sriramsv Date: Tue, 27 Dec 2022 23:44:31 -0800 Subject: [PATCH] Tasker Command Search --- community/tasker-command-search.lua | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 community/tasker-command-search.lua diff --git a/community/tasker-command-search.lua b/community/tasker-command-search.lua new file mode 100644 index 0000000..93cc135 --- /dev/null +++ b/community/tasker-command-search.lua @@ -0,0 +1,25 @@ +-- name = "Tasker Command Search" +-- description = "Sends tasker command from search bar" +-- data_source = "tasker" +-- type = "search" +-- author = "Sriram SV" +-- version = "1.0" +-- prefix = "tasker | Tasker | command" + +local md_color = require "md_colors" +local orange = md_colors.orange_500 + +text_from = "" +text_to = "" + +function on_search(input) + text_from = input + text_to = "" + search:show({input},{orange}) +end + +function on_click(idx) + text_from = string.lower(text_from) + text_from=text_from:replace(" ", "=:=") + tasker:send_command(text_from) +end \ No newline at end of file