I write this post because I didn’t manage to find the solution of my problem on the internet and I hope that a solution really exists.
I use a GUI application that runs on a PC equipped with CentOS 7.2 and an nVidia video card.
This GUI application is on two monitors that are one on the top of the other (the X screen is only one, :0) and one extends the other.
I would like to write a shell script that swaps the two monitors (the GUI panels on the top are displayed on the bottom and viceversa) on the fly, so without having to reboot Xorg.
At the same time, such swap has to act also on which monitor becomes the primary (i.e. the Gnome top bar should move from one monitor to the other).
So the result would be the same as I physically swapped the display port cables attached to the monitors.
Is it possible to assemble calls to nvidia-settings command line tool to achieve this result?
I’ve tried with xrandr and disper but the result is that, even though the cursor boundaries update accordingly to the new configuration, a shell windows that is on the lower monitor is not transferred to the upper monitor as I would expect.
Thanks for helping me.