CdLbB / fb-rotate

A Unix utility to rotate the display on any Mac and switch the primary display back and forth between displays.
http://modbookish.lefora.com/2010/06/29/a-unix-utility-to-change-the-primary-display-on-os/
163 stars 36 forks source link

Add option -d 1 to specify first non-internal monitor #2

Closed mscuthbert closed 9 years ago

mscuthbert commented 9 years ago

Adds option to "-d" of "1" which specifies rotation of the first active monitor in the monitor list that is not the internal monitor. For users with 3 or more monitors, this option won't be useful, but for users with two monitors the option will let the rotation be specified without looking up displayIDs

CdLbB commented 9 years ago

Hi

I found that using

fb-rotate -d 1 -m

is a convenient way to change the main monitor to the first non-internal screen, but there is no similarly convenient way to switch the main monitor back to the internal since once the main is the first non-internal screen

fb-rotate -d 1 -m and fb-rotate -d 0 -m

do not do anything. This seems awkward to me.

One option for fixing this is for -d 1 to refer to the first non-main screen. Another option might be to make -d 0 refer to the internal screen -d 1 refer to the main screen -d 2 refer to the first non-internal screen

What do you think?

--Eric

mscuthbert commented 9 years ago

Sounds good. Though perhaps just to keep the code a little easier, could we do "-d 0 = internal" "-d 1 = first non-internal" "-d 2 = main" "-d 3 = first non-main"; it'll just save a little rewriting of some scripts I've been using the code in.

CdLbB commented 9 years ago

That seems over complicated. Would you need both non-internal and non-main, in a two or three display situation?

How about -d -1 refer to the internal screen -d 0 refer to the main screen -d 1 refer to the first non-internal screen

--Eric

CdLbB commented 9 years ago

Adapted this pull request in "Adapted Pull Request #2 to add options for -d" (commit 8f3035a)