This commit is contained in:
2026-06-02 09:40:05 +02:00
parent d5f2dc3925
commit e79458d670
16 changed files with 2597 additions and 49 deletions
@@ -0,0 +1,22 @@
"""
Test skript — zobrazí počet monitorů, jejich rozlišení a který je primární.
"""
import sys
try:
from screeninfo import get_monitors
monitors = get_monitors()
print(f"Počet monitorů: {len(monitors)}\n")
for i, m in enumerate(monitors):
primary = " ← PRIMÁRNÍ" if getattr(m, "is_primary", False) else ""
print(f" Monitor {i+1}: {m.width}x{m.height} | pozice x={m.x}, y={m.y}{primary} | název: {getattr(m, 'name', '?')}")
except ImportError:
print("Knihovna 'screeninfo' není nainstalována — instaluji...")
import subprocess
subprocess.check_call([sys.executable, "-m", "pip", "install", "screeninfo", "--break-system-packages", "-q"])
from screeninfo import get_monitors
monitors = get_monitors()
print(f"Počet monitorů: {len(monitors)}\n")
for i, m in enumerate(monitors):
primary = " ← PRIMÁRNÍ" if getattr(m, "is_primary", False) else ""
print(f" Monitor {i+1}: {m.width}x{m.height} | pozice x={m.x}, y={m.y}{primary} | název: {getattr(m, 'name', '?')}")