Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displayplacer Rotation changes which display is Main vs. Extended Display, and Display Arrangement #133

Open
7k50 opened this issue Feb 8, 2024 · 2 comments

Comments

@7k50
Copy link

7k50 commented Feb 8, 2024

Apologies if this has been answered previously, I did not find an answer.

I have 2 displays: 1 Main Display and 1 Extended Display.

I want to rotate the Extended Display, while keeping the arrangement in place. However, running the command below will make the Extended Display the Main Display, and start displaying the Extended Display on the Main Display! I.e. the Arrangement Settings in System Preferences > Displays are not kept.

displayplacer "id:5 degree:0"

I tried also adjusting both displays as below, but that unfortunately leads to the same issue of not keeping the arrangement, though the rotations are correct:

displayplacer "id:5 degree:0" "id:5 degree:90"

Is there a solution that just changes the rotation of the intended display, and keeps the Main/Extended display selection & display arrangement?

@jakehilborn
Copy link
Owner

The internal macOS APIs for altering the screen layouts are unpredictable. You'll see the same surprising behavior when you change the rotation of something in the system settings and then mirroring becomes enabled or disabled, the layout gets all switched up, etc.

The best way to use displayplacer is to fully describe the layout of your monitors. Instead of just using "id:5 degree:0", also include the mirroring, resolution, scaling, and origin details.

@7k50
Copy link
Author

7k50 commented Feb 20, 2024

The internal macOS APIs for altering the screen layouts are unpredictable. You'll see the same surprising behavior when you change the rotation of something in the system settings and then mirroring becomes enabled or disabled, the layout gets all switched up, etc.

The best way to use displayplacer is to fully describe the layout of your monitors. Instead of just using "id:5 degree:0", also include the mirroring, resolution, scaling, and origin details.

Thank you for explaining, and for creating this tool!

Doing as follows seems to work OK:

displayplacer "id:<ID1> degree:0 origin:(0,0)" "id:<ID2> degree:90 origin:(3840,-1000)"

However, I am curious if there is a way to detect and retain the resolution of the second monitor () for its origin parameter. The reason is, I frequently change resolutions, so it would be better to detect it's resolution programatically (in this case it would be 3840), and set the origin coordinates accordingly.

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants