display module

Obtain the display geometry from shell, and library, calls.

In theory, there can be all sorts of weird and wonderful X11 setups, no sense worrying about them unless they crop up in practice.

see: xrandr(1)

display.logical_height()
Returns

logical height, in pixels, of the combined displays.

display.logical_width()
Returns

logical width, in pixels, of the combined displays.

display.n_displays()
Returns

number of available displays.

display.physical_height(i)
Parameters

i – index of display, zero-based.

Returns

height, in pixels, of display, i.

display.physical_width(i)
Parameters

i – index of display, zero-based.

Returns

width, in pixels, of display, i.

display.x_offset(i)
Parameters

i – index of display, zero-based.

Returns

x-offset, in pixels, of display i.

display.y_offset(i)
Parameters

i – index of display, zero-based.

Returns

y-offset, in pixels, of display i.