general ipc calls

This commit is contained in:
Zacharias-Brohn
2026-02-18 23:39:06 +01:00
parent e2eb0631cf
commit 5d5d9575b6
3 changed files with 38 additions and 1 deletions
+11
View File
@@ -5,22 +5,33 @@ args = ["qs", "-c", "zshell"]
app = typer.Typer()
@app.command()
def kill():
subprocess.run(args + ["kill"], check=True)
@app.command()
def start(no_daemon: bool = False):
subprocess.run(args + ([] if no_daemon else ["-d"]), check=True)
@app.command()
def show():
subprocess.run(args + ["ipc"] + ["show"], check=True)
@app.command()
def log():
subprocess.run(args + ["log"], check=True)
@app.command()
def lock():
subprocess.run(args + ["ipc"] + ["call"] + ["lock"] + ["lock"], check=True)
@app.command()
def call(target: str, method: str, method_args: list[str] = typer.Argument(None)):
subprocess.run(args + ["ipc"] + ["call"] + [target] +
[method] + method_args, check=True)