mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add more python plugin api.
This commit is contained in:
parent
5376171538
commit
1cf79d8fbc
1 changed files with 63 additions and 0 deletions
|
|
@ -41,3 +41,66 @@ class WoxAPI(object):
|
||||||
change wox query
|
change wox query
|
||||||
"""
|
"""
|
||||||
print json.dumps({"method": "Wox.ChangeQuery","parameters":[query,requery]})
|
print json.dumps({"method": "Wox.ChangeQuery","parameters":[query,requery]})
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def shell_run(cls,cmd):
|
||||||
|
"""
|
||||||
|
run shell commands
|
||||||
|
"""
|
||||||
|
print json.dumps({"method": "Wox.ShellRun","parameters":[cmd]})
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def close_app(cls):
|
||||||
|
"""
|
||||||
|
close wox
|
||||||
|
"""
|
||||||
|
print json.dumps({"method": "Wox.CloseApp","parameters":[]})
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def hide_app(cls):
|
||||||
|
"""
|
||||||
|
hide wox
|
||||||
|
"""
|
||||||
|
print json.dumps({"method": "Wox.HideApp","parameters":[]})
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def show_app(cls):
|
||||||
|
"""
|
||||||
|
show wox
|
||||||
|
"""
|
||||||
|
print json.dumps({"method": "Wox.ShowApp","parameters":[]})
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def show_msg(cls,title,sub_title,ico_path=""):
|
||||||
|
"""
|
||||||
|
show messagebox
|
||||||
|
"""
|
||||||
|
print json.dumps({"method": "Wox.ShowMsg","parameters":[title,sub_title,ico_path]})
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def open_setting_dialog(cls):
|
||||||
|
"""
|
||||||
|
open setting dialog
|
||||||
|
"""
|
||||||
|
print json.dumps({"method": "Wox.OpenSettingDialog","parameters":[]})
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def start_loadingbar(cls):
|
||||||
|
"""
|
||||||
|
start loading animation in wox
|
||||||
|
"""
|
||||||
|
print json.dumps({"method": "Wox.StartLoadingBar","parameters":[]})
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def stop_loadingbar(cls):
|
||||||
|
"""
|
||||||
|
stop loading animation in wox
|
||||||
|
"""
|
||||||
|
print json.dumps({"method": "Wox.StopLoadingBar","parameters":[]})
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def reload_plugins(cls):
|
||||||
|
"""
|
||||||
|
reload all wox plugins
|
||||||
|
"""
|
||||||
|
print json.dumps({"method": "Wox.ReloadPlugins","parameters":[]})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue