jakehilborn / displayplacer

macOS command line utility to configure multi-display resolutions and arrangements. Essentially XRandR for macOS.
MIT License
3.74k stars 134 forks source link

How to swap primary display when second display doesn't appear in System Settings > Displays #130

Open mrengy opened 10 months ago

mrengy commented 10 months ago

I'm using a MacBook Pro built-in monitor on MacOS 13.6.2, Duet for Mac version 2.3.3.3 and an external monitor using Duet Display on an old iPad (iPad 2, Duet for iOS 2.1.7, iOS 9.3.5 - the max for this device). Under the current version of Duet for Mac, it doesn't connect successfully on the iPad, so I'm having to use an old version.

In this arrangement, MacOS always sets the iPad as the primary display and puts the dock there. I want to change it so that the laptop is the primary display.

I know the displayplacer instructions say to use System Settings > Displays to arrange the displays as desired and then get the output using the displayplacer command, but System Settings > Delays does not recognize the external display, even when it is connected and showing an extension of my desktop. I also saw #19 which depended on the same thing.

System Settings > Displays showing only the built in display

Is there a command-line command I can use to swap the primary display without having to rely on the UI in System Settings > Displays?

jgenunez commented 4 months ago

Primary display can be set from the command line with origin(0,0). If you have a mirroring set then ensure you put FIRST whichever display you want it to optimize for. However it sounds like your external Duet display is not detected at all.

Also I found that the displayplacer commands to set a profile stops working after repeated use. The only way I was able to workaround this was to restart my computer.