Refine config and runtime flow
This commit is contained in:
parent
85e082dd46
commit
b3be444625
16 changed files with 642 additions and 137 deletions
|
|
@ -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."
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue