Add display refresh rate detection and display
Some checks failed
Validate / validate (push) Failing after 8s

- Added get_monitor_refresh_rates() function in monitor_names.py using Windows ctypes/DEVMODE to detect monitor refresh rates
- Updated DisplayInfo dataclass and Pydantic schema to include refresh_rate field (in Hz)
- Modified get_available_displays() to detect and include refresh rates (defaults to 60Hz on non-Windows or if detection fails)
- Added refresh rate display in Web UI between Resolution and Position
- Added translations for refresh rate label (displays.refresh_rate) in English and Russian locales
- Cross-platform compatible: gracefully falls back to 60Hz default on non-Windows systems

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-06 17:18:35 +03:00
parent c40c8b9d26
commit c1259a9a7f
7 changed files with 105 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
"""Utility functions and helpers."""
from .logger import setup_logging, get_logger
from .monitor_names import get_monitor_names, get_monitor_name
from .monitor_names import get_monitor_names, get_monitor_name, get_monitor_refresh_rates
__all__ = ["setup_logging", "get_logger", "get_monitor_names", "get_monitor_name"]
__all__ = ["setup_logging", "get_logger", "get_monitor_names", "get_monitor_name", "get_monitor_refresh_rates"]