aboutsummaryrefslogtreecommitdiffstats
path: root/deckit
diff options
context:
space:
mode:
Diffstat (limited to 'deckit')
-rw-r--r--deckit/modules/assistant.py2
-rw-r--r--deckit/server.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/deckit/modules/assistant.py b/deckit/modules/assistant.py
index d535eb7..247caf4 100644
--- a/deckit/modules/assistant.py
+++ b/deckit/modules/assistant.py
@@ -170,6 +170,8 @@ def make(cfg: dict) -> Module:
conn["sock"] = s
with lock:
st.update(connected=True, error=None)
+ # Off-thread: qs may take seconds; retries a catalog that failed at start.
+ threading.Thread(target=load_catalog, daemon=True).start()
try:
send({"type": "models"})
for line in s.makefile("r", encoding="utf-8", errors="replace"):
diff --git a/deckit/server.py b/deckit/server.py
index bdaca9e..38de5d3 100644
--- a/deckit/server.py
+++ b/deckit/server.py
@@ -116,7 +116,10 @@ def nerd_font():
if "p" not in _font:
out = _run(["fc-match", "-f", "%{file}", "Inconsolata Nerd Font:style=Regular"])
# fc-match falls back to any font; only a Nerd Font has the glyphs.
- _font["p"] = Path(out) if "NerdFont" in out.replace(" ", "") and Path(out).is_file() else None
+ found = "NerdFont" in out.replace(" ", "") and Path(out).is_file()
+ if not found:
+ return None # not cached: keep retrying until a font is installed
+ _font["p"] = Path(out)
return _font["p"]