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

@@ -26,6 +26,7 @@
"displays.badge.primary": "Primary",
"displays.badge.secondary": "Secondary",
"displays.resolution": "Resolution:",
"displays.refresh_rate": "Refresh Rate:",
"displays.position": "Position:",
"displays.index": "Display Index:",
"displays.loading": "Loading displays...",

View File

@@ -26,6 +26,7 @@
"displays.badge.primary": "Основной",
"displays.badge.secondary": "Вторичный",
"displays.resolution": "Разрешение:",
"displays.refresh_rate": "Частота Обновления:",
"displays.position": "Позиция:",
"displays.index": "Индекс Дисплея:",
"displays.loading": "Загрузка дисплеев...",