更改解析度會使應用程式掛在螢幕外

更改解析度會使應用程式掛在螢幕外

我的 MacBookPro(2012 年,視網膜顯示器之前的最後一個版本)使用了外接顯示器。

在不連接外接顯示器的情況下,我的 MacBook 上的解析度為 1440x900,生活還不錯。

在家裡,我連接到具有相同解析度的外部顯示器(和鏡像顯示器) - 生活很棒。
然而,當我來到學校並在實驗室(和鏡像顯示器)中設置自己時,我連接到最大分辨率為 1280x900 的外部顯示器,如下面的螢幕截圖所示

螢幕解析度截圖

問題是,隨著解析度寬度的損失,所有放大(左上角的綠色按鈕)以佔據整個螢幕的應用程式往往認為它們仍然可以佔據 1440 像素的寬度。這會導致這些應用程式被外部顯示器切斷:

在此輸入影像描述

現在,我被迫循環瀏覽所有應用程式的所有開啟的窗口,以將它們的大小調整為適合此外部顯示器。此外,當我回到家時,我必須對 1440x900 解析度重複此過程。

有沒有一種方法可以避免所有這些手動調整大小(也許是自動的,或者甚至是一個蘋果腳本,當它檢測到分辨率變化時,它會為我執行此操作)?

我使用的是 Mac OS X 10.7.5 (Lion),如果有的話

答案1

我不確定是否可以直接解決您的問題,即讓應用程式在鏡像時知道較小螢幕的真實尺寸。

然而,我使用兩個實用程式的組合(遺憾的是不是免費的)來管理兩個辦公室和家庭之間的移動(每個實用程式都在我的 MacBook Pro 上連接了不同的顯示器組合)。

他們是:

安排 (透過瑣事應用程式

停留 (透過無線狗

因此,Arrange 可以更快地將視窗移動到精確位置(鍵盤快捷鍵、熱角或視覺網格,根據您的喜好),並且具有多顯示器感知功能; Stay 將根據每個配置儲存這些安排。因此,一旦它得知顯示器 X 意味著視窗 A 和 B 都有一定的大小,它下次就會記住,如果它們在顯示器 Y 上不同,當您插入該顯示器時,它會更改它們。

它們都有免費試用版,因此您可以嘗試一下,看看是否有幫助。很抱歉無法提供免費的解決方案!

更新

我現在使用眼鏡(作者:埃里克·查尼) 而不是排列。它是捐贈軟體,根據我的經驗似乎更穩定。它不像 Arrange 那麼複雜,但可以滿足我需要的一切。

答案2

Stay 不是免費的,也不能一直處理所有應用程式(有問題)

一些幫助,我能夠想出這個完美完成這項工作的蘋果腳本:

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)
                        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

相關內容