from dataclasses import dataclass @dataclass class Modeline: width: int height: int refresh_rate: float def __str__(self): return f"{self.width}x{self.height}@{self.refresh_rate:.3f}" def __repr__(self): return self.__str__() @dataclass class MonitorInfo: connector: str primary: bool modes: list[Modeline]