Refine config and runtime flow

This commit is contained in:
Thales Maciel 2026-02-24 14:15:17 -03:00
parent 85e082dd46
commit b3be444625
No known key found for this signature in database
GPG key ID: 33112E6833C34679
16 changed files with 642 additions and 137 deletions

View file

@ -14,12 +14,13 @@ class DesktopAdapter(Protocol):
def run_tray(self, state_getter: Callable[[], str], on_quit: Callable[[], None]) -> None:
raise NotImplementedError
def request_quit(self) -> None:
raise NotImplementedError
def get_desktop_adapter() -> DesktopAdapter:
session_type = os.getenv("XDG_SESSION_TYPE", "").lower()
if session_type == "wayland" or os.getenv("WAYLAND_DISPLAY"):
from desktop_wayland import WaylandAdapter
raise SystemExit(
"Wayland is not supported yet. Run under X11 (XDG_SESSION_TYPE=x11) to use lel."
)