I'm using an external monitor with my MacBookPro (2012, last version before retina display).

Without connecting to an external monitor, the resolution on my macbook is 1440x900, and life is good.

At home, I connect to an external monitor (and mirror displays) with the same resolution - life is great.
However, when I come to school and set myself up in the lab (and mirror displays), I connect to an external monitor with an apparent maximum resolution of 1280x900 as can be seen in the screenshot below

screen resolution screenshot

The problem is that with the loss in the resolution's width, all the applications that were zoomed in (with the green button on the top left hand corner) to occupy the full screen, tend to think that they can still occupy 1440 pixels in width. This has the effect of these applications being cut off by the external monitor:

enter image description here

Now, I am forced to cycle through all the open windows of all my applications to resize them to this external monitor. Further, when I go back home, I have to repeat this process for the 1440x900 resolution.

Is there a way I can avoid all this manual resizing (automated perhaps, or maybe even an applescript that'll do this for me when it detects a change in resolution)?

I'm on Mac OS X 10.7.5 (Lion), if it matters


I'm not sure of a direct solution to your problem, i.e. something which would let applications know the true dimensions of the smaller screen when mirroring.

However, I use a combination of two utilities (sadly not free) to manage moving between two offices and home (each with a different combination of monitors attached to my MacBook Pro).

They are:

Arrange (by Trifle Apps)

Stay (by Cordless Dog)

So, Arrange makes moving windows to precise locations quicker (keyboard shortcuts, hot corners or a visual grid, as you prefer) and is multiple-monitor aware; Stay will save these arrangements on a per-configuration basis. So once it learns that monitor X means window A and B are both a certain size, it will remember next time, and if they are different on monitor Y it will change them when you plug that monitor in.

They both have free trials, so you could give them a go and see if they help. Sorry not to be able to offer a free solution!


I now use Spectacle (by Eric Czarny) instead of Arrange. It’s donationware, and seems to be more stable in my experience. It is less sophisticated than Arrange, but does everything I need.

  • Stay did the trick for me – inspectorG4dget Jan 11 '13 at 3:50
  • Great! Glad to help. – Leo Jan 11 '13 at 8:13

Stay is not free and also does not handle all apps all the time (it's buggy)

With some help, I was able to come up with this applescript that does the job perfectly:

property blacklist : {"Finder", "Preview", "Console", "AppleScript Editor", "Spotify", "TaskCoach"}
property buttonApps : {"LyX", "Eclipse"}
property buttonMaps : {{name:"LyX", Button:1, pname:"lyx"}, {name:"Eclipse", Button:2, pname:"eclipse"}}

tell application "Finder" to set theBounds to bounds of window of desktop

tell application "System Events"
    set bids to bundle identifier of processes where background only is false
end tell

repeat with bid in bids
    tell application id bid
        if name is not in blacklist then
            set appName to name as string
            if name is "Terminal" then
                set newBounds to {0, 0, (item 3 of theBounds) - 10, item 4 of theBounds}
                repeat with theWindow in windows
                    if visible of theWindow is true then
                        say appName
                        set bounds of theWindow to newBounds
                    end if
                end repeat
            else if name is not in buttonApps then
                repeat with theWindow in windows
                    if visible of theWindow is true then
                        set bounds of theWindow to theBounds
                    end if
                end repeat
            else if name is in buttonApps then
                -- get the buttonNumber
                repeat with buttonApp in buttonMaps
                    if (name of buttonApp as string) is appName then
                        set theButton to Button of buttonApp
                    end if
                end repeat
                tell application "System Events"
                    repeat with theProcess in (processes where bundle identifier is bid)
                            tell theProcess to tell window 1 to click button theButton
                        end try
                    end repeat
                end tell
            end if
        end if
    end tell
end repeat

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.