Gimp.get_monitor_resolution

function get_monitor_resolution(): [ok: Boolean, xres: Number(gdouble), yres: Number(gdouble)] {
    // Gjs wrapper for gimp_get_monitor_resolution()
}
  

Get the monitor resolution as specified in the Preferences.

Returns the resolution of the monitor in pixels/inch. This value is taken from the Preferences (or the windowing system if this is set in the Preferences) and there's no guarantee for the value to be reasonable.

ok

TRUE on success.

xres

X resolution.

yres

Y resolution.