fix: suppress unnecessary log output
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
@@ -8,6 +9,15 @@ args = ["qs", "-c", "zshell"]
|
||||
|
||||
app = typer.Typer()
|
||||
|
||||
qt_logging_rules = (
|
||||
"qt.qml.warning=false;"
|
||||
"qt.qpa.wayland.*=false;"
|
||||
"scene=false;"
|
||||
"quickshell.service.sni.watcher=false;"
|
||||
"default.warning=false;"
|
||||
"default.info=false"
|
||||
)
|
||||
|
||||
|
||||
@app.command()
|
||||
def kill():
|
||||
@@ -19,8 +29,13 @@ def kill():
|
||||
|
||||
|
||||
def start_instance(no_daemon: bool = False) -> None:
|
||||
env = os.environ.copy()
|
||||
env["QT_LOGGING_RULES"] = qt_logging_rules
|
||||
|
||||
result = subprocess.run(
|
||||
args + ["-n"] + ([] if no_daemon else ["-d"]), capture_output=True
|
||||
args + ["-n"] + ([] if no_daemon else ["-d"]),
|
||||
capture_output=True,
|
||||
env=env,
|
||||
)
|
||||
stdout = result.stdout.decode().strip()
|
||||
if stdout and "already running" in stdout.lower():
|
||||
|
||||
Reference in New Issue
Block a user