feat: add various system and theme icons, configuration files, and support assets

This commit is contained in:
jschantli committed 2026-10-03 08:14:42 -07:00
1 parent 848dac4264
commit 54baea79f4
15893 files changed
+781426 -2

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
"""Run blocking work off the GTK main loop."""
from __future__ import annotations
import threading
from typing import Callable
from gi.repository import GLib
def run_async(work: Callable[[], object], done: Callable[[object, Exception | None], None]) -> None:
"""Execute `work` in a thread; call `done(result, error)` on the main loop."""
def target():
try:
result, error = work(), None
except Exception as e: # surfaced to the UI as a toast
result, error = None, e
GLib.idle_add(lambda: (done(result, error), False)[1])
threading.Thread(target=target, daemon=True).start()