Now that I use Sidecar to turn my iPad Pro into a second screen I got a bit tired of going to the display preferences to change where my iPad was physically sitting each time. Since I am hot desking I have to put it on the left or the right and that changes almost daily.
Originally, I thought I would fix this would Keyboard Maestro but it can’t change the display layout and it is too hard to automate it to do the preferences.
After following the instructions to install the tool you can capture your current screen configuration and then run a command to switch.
I created a Keyboard Maestro macro that monitors when the iPad is plugged in and then prompts me to turn on sidecar and choose the side of the desk where the iPad sits.