Ignore transient Quickshell clients in Health
This commit is contained in:
@@ -130,7 +130,7 @@ RUNTIME_LINK_TARGETS = (
|
||||
("vicinae", Path("config/dot/vicinae")),
|
||||
)
|
||||
REPAIR_IDS = frozenset((*REPAIR_COMMANDS.keys(), "panama.runtime-links", "panama.vicinae-commands", "panama.caffeine"))
|
||||
PROCESS_NAMES = ("quickshell", "vicinae", "hyprpaper", "hypridle")
|
||||
PROCESS_NAMES = ("vicinae", "hyprpaper", "hypridle")
|
||||
VERSION_PATTERN = re.compile(r"\b\d+(?:\.\d+){0,3}(?:[-+._][A-Za-z0-9._-]+)?\b")
|
||||
REVISION_PATTERN = re.compile(r"\b[0-9a-f]{7,40}\b", re.IGNORECASE)
|
||||
PROBE_ENVIRONMENT_KEYS = (
|
||||
@@ -436,7 +436,21 @@ def executable_check(check_id: str, title: str, executable: str, config: DoctorC
|
||||
|
||||
|
||||
def check_processes(config: DoctorConfig) -> Check:
|
||||
counts: list[int] = []
|
||||
# `qs` is both the long-running shell and every short-lived IPC client.
|
||||
# Counting it with pgrep races the other parallel health probes and reports
|
||||
# duplicates whenever one of them happens to call `qs ipc`. The instance
|
||||
# list is the authoritative view and contains only actual shells.
|
||||
quickshell = run_command(("qs", "list"), config)
|
||||
if quickshell.state == "ok":
|
||||
quickshell_count = sum(
|
||||
line.startswith("Instance ") for line in quickshell.stdout.splitlines()
|
||||
)
|
||||
elif quickshell.state == "failed":
|
||||
quickshell_count = 0
|
||||
else:
|
||||
return Check("panama.processes", "panama-tools", "Panama processes", "warning", "Process probe is unavailable.")
|
||||
|
||||
counts: list[int] = [quickshell_count]
|
||||
for name in PROCESS_NAMES:
|
||||
result = run_command(("pgrep", "-u", str(os.getuid()), "-x", name), config)
|
||||
if result.state == "ok":
|
||||
|
||||
Reference in New Issue
Block a user