sevaht_gui.monitors

Monitor geometry, multi-monitor aware.

tkinter has no native Wayland backend, so on Wayland it runs under XWayland and the X11 RandR extension is available. This queries RandR through python-xlib (already a Linux dependency) rather than shelling out to the xrandr binary, which may not be installed; it therefore works under both X11 and XWayland.

Falls back to the full Tk screen size, which is correct for single-monitor setups and for Windows (where Tk reports the primary monitor).

sevaht_gui.monitors.primary_monitor_bounds(root: tk.Misc) tuple[int, int, int, int][source]

Return the primary monitor’s (x, y, width, height) in pixels.

root is any Tk widget, used both to talk to the display and for the fallback screen size.