-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (27 loc) · 895 Bytes
/
Copy pathmain.py
File metadata and controls
31 lines (27 loc) · 895 Bytes
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
import sys, os
parent_folder_path = os.path.abspath(os.path.dirname(__file__))
sys.path.append(parent_folder_path)
sys.path.append(os.path.join(parent_folder_path, 'lib'))
sys.path.append(os.path.join(parent_folder_path, 'plugin'))
from flowlauncher import FlowLauncher
import random
class randomNum(FlowLauncher):
def query(self, query):
results = []
number = str(random.randint(0, 10000))
if query == 'number':
results.append({
'title': number,
'subtitle': 'Click to copy',
'icon': 'app.png'
})
else:
results.append({
'title': 'Random Number',
'subtitle': 'Type "number" and press enter',
'arg': 'number',
'icon': 'app.png'
})
return results
if __name__ == "__main__":
randomNum()