Can we setup Mirror display mode with dbus?

Hello people,

I have been exploring ways to set up a mirror display mode on my system. I know this can be accomplished using xrandr. However, I am curious if the same can be achieved through dbus, which might streamline some of our processes.

Has anyone here successfully set up mirror display mode using dbus, or can point me towards relevant documentation or examples? Any guidance or insights would be greatly appreciated!

Thank you!

You can find the dbus interface used for the GNOME display configuration here:

This is used by the display panel in gnome-control-center, so you can look at the code there or for a much simpler code base you can look at this CLI display configuration tool: GitHub - jadahl/gnome-monitor-config