forked from cinghiopinghio/external
-
Notifications
You must be signed in to change notification settings - Fork 0
/
org.albert.extension.external.template.sh
executable file
·61 lines (60 loc) · 1.25 KB
/
org.albert.extension.external.template.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
case $ALBERT_OP in
"METADATA")
METADATA='{
"iid":"org.albert.extension.external/v2.0",
"name":"Template",
"version":"1.0",
"author":"Manuel Schneider",
"dependencies":[],
"trigger":"template"
}'
echo -n "${METADATA}"
exit 0
;;
"INITIALIZE")
exit 0
;;
"FINALIZE")
exit 0
;;
"SETUPSESSION")
exit 0
;;
"TEARDOWNSESSION")
exit 0
;;
"QUERY")
RESULTS='{
"items":[{
"name":"Item One",
"description":"Item description containing the query: '"'${ALBERT_QUERY:9}'"'",
"icon":"unknown",
"actions":[{
"name":"Item action 1",
"command":"",
"arguments":[]
},{
"name":"Secondary item action 1",
"command":"",
"arguments":[]
}]
},{
"name":"Item two",
"description":"Item description containing the query: '"'${ALBERT_QUERY:9}'"'",
"icon":"unknown",
"actions":[{
"name":"Item action 2",
"command":"",
"arguments":[]
},{
"name":"Secondary item action 2",
"command":"",
"arguments":[]
}]
}]
}'
echo -n "${RESULTS}"
exit 0
;;
esac