私は少し前に同じ問題に遭遇しました、そして、ここに私がしたことです:
最初に、すでに提案されているように、ディスプレイをミラーリングしました。これを行って間もなく、Macbookの点灯している画面を目の隅でオフにするのは非常に気が散ることに気付きました。これには、Macbookの画面の明るさを消す必要がありました。しかし、私は怠け者なので、外部モニターを取り外す/接続するたびに輝度を手動で調整する必要がありませんでした。そのため、プロセスを自動化する方法があるかどうか疑問に思いました。特定のデバイス(モニター、ハードドライブなど)が接続されているかどうか、特定のwi-fiネットワークが範囲内にあるかどうかなどに基づいて「コンテキスト」を設定できるコントロールプレーンと呼ばれるこの無料アプリを見つけました。これらのコンテキストに基づいて、特定のシェルスクリプトを実行します。だから、私がしなければならなかったのは、AppleScript(killBrightness.scpt)Macbookの画面の明るさと、呼び出すシェルスクリプトを強制終了しますkillBrightness.scpt。必要なコンテキストでこのシェルスクリプトを呼び出します。
killBrightness.scpt
tell application "System Preferences" to set current pane to pane "Displays"
tell application "System Events"
    tell process "System Preferences"
        repeat with theWindow in windows
            if title of theWindow as string is "Color LCD" then
                tell tab group 1 of theWindow
                    tell slider 1 of group 2
                        set value to 0
                    end tell
                end tell
            end if
        end repeat
    end tell
end tell
tell application "System Preferences" to quit
シェルスクリプト
#!/bin/sh
osascript /path/to/killBrightness.scpt
Macbookにはさまざまなモニターを接続しているため、アスペクト比の異なるモニターを接続すると、ウィンドウが画面の端から垂れ下がることに気付きました。これに対する解決策は、ウィンドウのサイズを変更することですが、私のように大量のアプリやウィンドウを使用する場合は非常に非効率的です。また、私は私と同じように怠beingであり、その解決策が好きではありませんでした。だから、Stack Overflowの素晴らしい人々の助けを借りて、resizer.scpt(ほとんど)すべてのアプリのすべてのウィンドウを自動的にサイズ変更するこのAppleScript(と呼ばれる)を思い付くことができました(いくつかのアプリケーションは正しいものを使用しないことですUIフレームワークフック、したがって、それらのサイズを変更することは非常に困難です):
resizer.scpt:
property blacklist : {"Finder", "Preview", "Console", "AppleScript Editor", "Spotify", "TaskCoach", "Skype", "VirtualBox"}
property buttonApps : {"LyX", "Eclipse"}
property buttonMaps : {{name:"LyX", Button:1, pname:"lyx"}, {name:"Eclipse", Button:2, pname:"eclipse"}, {name:"Spotify", Button:3, pname:"Spotify"}, {name:"TaskCoach", Button:3, pname:"TaskCoach"}}
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
                        set bounds of theWindow to newBounds
                    end if
                end repeat
            else if name is not in buttonApps then
                try
                    repeat with theWindow in windows
                        if visible of theWindow is true then
                            set bounds of theWindow to theBounds
                        end if
                    end repeat
                end try
            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)
                        try
                            tell theProcess to tell window 1 to click button theButton
                        end try
                    end repeat
                end tell
            end if
        end if
    end tell
end repeat
今、私がしなければならないことは、それを呼び出しresizer.scptてそれをControlPlaneに入れるための同様のシェルスクリプトを書くことだけでした。
お役に立てれば
PS:このすべてがLionを実行している15インチMacBook Proで行われたことを言及するのを忘れていました