Files

27 lines
728 B
Python

import os
from typing import override
from ..abstracts import AbstractDisplay
from ..structs import MonitorInfo, Modeline
class Display(AbstractDisplay):
def get_modes(self) -> list[MonitorInfo]:
pass
def set_mode(self, modeline: Modeline, requested_connector: str) -> None:
pass
def read_saved_mode(self, location: str | Path) -> Modeline:
pass
def save_current_mode(self, location: str | Path) -> None:
pass
@staticmethod
def detect():
desktop = os.environ.get("XDG_CURRENT_DESKTOP", "").lower()
known = {"sway", "cage", "labwc", "wayfire", "hyprland"}
return bool(set(desktop) & known) or "WAYLAND_DISPLAY" in os.environ