2

I know that there were some 3rd party apps that could do this in the past, but with each new version of Mac OS X, it seems that many of those 3rd party apps stop working or the project ages and loses it's maintainer.

I'm wondering if there is a Mac OS X built-in keyboard shortcut to do this. I suppose this wouldn't be limited to finder windows, but for windows of any application.

  • I cannot believe that Apple has still not added this feature the way it is in Windows (not everything Microsoft creates is bad Apple!) – mvreijn Dec 6 '18 at 10:14
1

As far as I know, there is no "out of the box" way or any system shortcut, to be able to align or arrange Finder windows. However, using Script Editor.app to create an AppleScript to set the bounds (size and location) of the finder windows, you can then bring your finished AppleScript code into Automator.app by creating a new document in Automator and selecting "Service" as the new document type.


enter image description here


The next step would be adding a run AppleScript action to the workflow, then paste the previously mentioned AppleScript, which we compiled in Script Editor.app, into the run AppleScript action in Automator


enter image description here


Next you would save and name the Automator service (I named it "Arrange Finder Windows"). After this, your new service will be available in system preferences at which point you can assign it a keyboard shortcut.


enter image description here


Now let's take a look at the process involved in creating the script in Script Editor.app, to manipulate the Finder windows. Using my 15" MacBook Pro, I have 5 different Display Resolutions I can choose from. What I'm getting at is, if my current display resolution is set at "Default", whatever code I create which will manipulate finder windows, Will function correctly only when I'm using the default display resolution. At a later point if I decide to change my Display either higher or lower, the code I created while using the default display, will actually place the Finder windows in different locations as they were originally meant.

In short, the goal here is to be able to align and arrange Finder windows(processing from one up to six windows) no matter which Display Resolution I am currently using.

enter image description here

This first part of the following code sets property values for all five different display resolutions I can choose in system preferences

-- ALL POSSIBLE DISPLAY RESOLUTION VALUES IN SYSTEM PREFERENCES --
property displayRezolution_Lowest : {0, 0, 1024, 640}
property displayRezolution_Lower : {0, 0, 1280, 800}
property displayRezolution_Default : {0, 0, 1440, 900}
property displayRezolution_Higher : {0, 0, 1680, 1050}
property displayRezolution_Highest : {0, 0, 1920, 1200}

This next snippet of code will retrieve the actual display resolution currently being used on the monitor

-- GETS THE CURRENT DISPLAY RESOLUTION BEING USED --
tell application "Finder" to set getRezolution to get bounds of window of desktop

This next snippet determines which script object to run based on the current display resolution. (I created five different script objects, one script for every Display resolution... Each of which contains different values for the bounds of the finder windows

-- DETERMINES WHICH SCRIPT TO RUN BASED ON THE CURRENT DISPLAY RESOLUTION --
if getRezolution is equal to displayRezolution_Lowest then
    run script displayRezolutionLowest
else if getRezolution is equal to displayRezolution_Lower then
    run script displayRezolutionLower
else if getRezolution is equal to displayRezolution_Default then
    run script displayRezolutionDefault
else if getRezolution is equal to displayRezolution_Higher then
    run script displayRezolutionHigher
else if getRezolution is equal to displayRezolution_Highest then
    run script displayRezolutionHighest
end if

Here is the full script which will be placed into Automator

-- ALL POSSIBLE DISPLAY RESOLUTION VALUES IN SYSTEM PREFERENCES --

property displayRezolution_Lowest : {0, 0, 1024, 640}
property displayRezolution_Lower : {0, 0, 1280, 800}
property displayRezolution_Default : {0, 0, 1440, 900}
property displayRezolution_Higher : {0, 0, 1680, 1050}
property displayRezolution_Highest : {0, 0, 1920, 1200}

-- GETS THE CURRENT DISPLAY RESOLUTION BEING USED --

tell application "Finder" to set getRezolution to get bounds of window of desktop

-- DETERMINES WHICH SCRIPT TO RUN BASED ON THE CURRENT DISPLAY RESOLUTION --

if getRezolution is equal to displayRezolution_Lowest then
    run script displayRezolutionLowest
else if getRezolution is equal to displayRezolution_Lower then
    run script displayRezolutionLower
else if getRezolution is equal to displayRezolution_Default then
    run script displayRezolutionDefault
else if getRezolution is equal to displayRezolution_Higher then
    run script displayRezolutionHigher
else if getRezolution is equal to displayRezolution_Highest then
    run script displayRezolutionHighest
end if

--  INDIVIDUAL SCRIPT OBJECTS   --

script displayRezolutionLowest
    property savedBoundz6 : {{0, 22, 479, 456}, {480, 22, 959, 456}, {961, 22, 1440, 456}, ¬
        {0, 458, 479, 892}, {480, 457, 959, 891}, {961, 457, 1440, 891}}
    property savedBoundz5 : {{0, 22, 479, 456}, {480, 22, 959, 456}, {961, 22, 1440, 456}, ¬
        {0, 458, 479, 892}, {480, 457, 1440, 891}}
    property savedBoundz4 : {{0, 22, 517, 366}, {518, 22, 1024, 366}, ¬
        {0, 294, 517, 638}, {518, 295, 1024, 639}}
    property savedBoundz3 : {{0, 22, 342, 640}, {343, 22, 684, 640}, {685, 22, 1024, 640}}
    property savedBoundz2 : {{0, 22, 517, 640}, {518, 22, 1024, 640}}

    tell application "Finder"
        if (count of every window) = 6 then
            set theBoundz to savedBoundz6
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 5 then
            set theBoundz to savedBoundz5
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 4 then
            set theBoundz to savedBoundz4
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 3 then
            set theBoundz to savedBoundz3
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 2 then
            set theBoundz to savedBoundz2
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 1 then
            run script centerWindow
        else if (count of every window) = 0 then
            return
        else if (count of every window) is greater than 6 then
            return
        end if
    end tell

    script centerWindow
        property sidebarWidth : 259
        property theBoundz : missing value
        property theBoundz_1 : {163, 76, 876, 547}
        property theBoundz_2 : {260, 119, 1060, 652}
        property theBoundz_3 : {305, 73, 1126, 812}
        property theBoundz_4 : {353, 122, 1324, 868}
        property theBoundz_5 : {466, 201, 1467, 1129}

        property displayRezolution_Lowest : {0, 0, 1024, 640}
        property displayRezolution_Lower : {0, 0, 1280, 800}
        property displayRezolution_Default : {0, 0, 1440, 900}
        property displayRezolution_Higher : {0, 0, 1680, 1050}
        property displayRezolution_Highest : {0, 0, 1920, 1200}

        tell application "Finder" to set getRez to get bounds of window of desktop

        if displayRezolution_Lowest is equal to getRez then
            centerFinderWindow(theBoundz_1)
        end if
        if displayRezolution_Lower is equal to getRez then
            centerFinderWindow(theBoundz_2)
        end if
        if displayRezolution_Default is equal to getRez then
            centerFinderWindow(theBoundz_3)
        end if
        if displayRezolution_Higher is equal to getRez then
            centerFinderWindow(theBoundz_4)
        end if
        if displayRezolution_Highest is equal to getRez then
            centerFinderWindow(theBoundz_5)
        end if

        on centerFinderWindow(theBoundz)
            tell application "Finder"
                try
                    tell its Finder windows
                        set its current view to column view
                        set its bounds to theBoundz
                        delay 0.1
                        set its sidebar width to sidebarWidth
                        delay 0.1
                        set its toolbar visible to true
                        delay 0.1
                    end tell
                    tell its Finder windows
                        set its sidebar width to sidebarWidth
                    end tell
                end try
            end tell
        end centerFinderWindow
    end script
end script

script displayRezolutionLower
    property savedBoundz6 : {{438, 410, 879, 800}, {0, 22, 437, 409}, {438, 22, 879, 409}, ¬
        {1, 410, 437, 800}, {880, 22, 1280, 409}, {880, 410, 1280, 800}}
    property savedBoundz5 : {{657, 410, 1280, 800}, {0, 22, 437, 409}, ¬
        {438, 22, 879, 409}, {1, 410, 656, 800}, {880, 22, 1280, 409}}
    property savedBoundz4 : {{657, 410, 1280, 800}, {0, 22, 656, 409}, {657, 22, 1280, 409}, ¬
        {1, 410, 656, 800}}
    property savedBoundz3 : {{846, 22, 1280, 800}, {407, 22, 845, 800}, {0, 22, 406, 800}}
    property savedBoundz2 : {{648, 22, 1280, 800}, {0, 22, 647, 800}}

    tell application "Finder"
        if (count of every window) = 6 then
            set theBoundz to savedBoundz6
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 5 then
            set theBoundz to savedBoundz5
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 4 then
            set theBoundz to savedBoundz4
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 3 then
            set theBoundz to savedBoundz3
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 2 then
            set theBoundz to savedBoundz2
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 1 then
            run script centerWindow
        else if (count of every window) = 0 then
            return
        else if (count of every window) is greater than 6 then
            return
        end if
    end tell

    script centerWindow
        property sidebarWidth : 259
        property theBoundz : missing value
        property theBoundz_1 : {163, 76, 876, 547}
        property theBoundz_2 : {260, 119, 1060, 652}
        property theBoundz_3 : {305, 73, 1126, 812}
        property theBoundz_4 : {353, 122, 1324, 868}
        property theBoundz_5 : {466, 201, 1467, 1129}

        property displayRezolution_Lowest : {0, 0, 1024, 640}
        property displayRezolution_Lower : {0, 0, 1280, 800}
        property displayRezolution_Default : {0, 0, 1440, 900}
        property displayRezolution_Higher : {0, 0, 1680, 1050}
        property displayRezolution_Highest : {0, 0, 1920, 1200}

        tell application "Finder" to set getRez to get bounds of window of desktop

        if displayRezolution_Lowest is equal to getRez then
            centerFinderWindow(theBoundz_1)
        end if
        if displayRezolution_Lower is equal to getRez then
            centerFinderWindow(theBoundz_2)
        end if
        if displayRezolution_Default is equal to getRez then
            centerFinderWindow(theBoundz_3)
        end if
        if displayRezolution_Higher is equal to getRez then
            centerFinderWindow(theBoundz_4)
        end if
        if displayRezolution_Highest is equal to getRez then
            centerFinderWindow(theBoundz_5)
        end if

        on centerFinderWindow(theBoundz)
            tell application "Finder"
                try
                    tell its Finder windows
                        set its current view to column view
                        set its bounds to theBoundz
                        delay 0.1
                        set its sidebar width to sidebarWidth
                        delay 0.1
                        set its toolbar visible to true
                        delay 0.1
                    end tell
                    tell its Finder windows
                        set its sidebar width to sidebarWidth
                    end tell
                end try
            end tell
        end centerFinderWindow
    end script
end script

script displayRezolutionDefault
    property savedBoundz6 : {{0, 22, 479, 456}, {480, 22, 959, 456}, {961, 22, 1440, 456}, ¬
        {0, 458, 479, 892}, {480, 457, 959, 891}, {961, 457, 1440, 891}}
    property savedBoundz5 : {{0, 22, 479, 456}, {480, 22, 959, 456}, {961, 22, 1440, 456}, ¬
        {0, 458, 479, 892}, {480, 457, 1440, 891}}
    property savedBoundz4 : {{722, 22, 1440, 456}, {0, 22, 721, 456}, {722, 457, 1440, 900}, ¬
        {0, 458, 721, 900}}
    property savedBoundz3 : {{0, 22, 479, 900}, {480, 22, 959, 900}, {961, 22, 1453, 900}}
    property savedBoundz2 : {{0, 22, 715, 900}, {716, 22, 1438, 900}}

    tell application "Finder"
        if (count of every window) = 6 then
            set theBoundz to savedBoundz6
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 5 then
            set theBoundz to savedBoundz5
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 4 then
            set theBoundz to savedBoundz4
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 3 then
            set theBoundz to savedBoundz3
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 2 then
            set theBoundz to savedBoundz2
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 1 then
            run script centerWindow
        else if (count of every window) = 0 then
            return
        else if (count of every window) is greater than 6 then
            return
        end if
    end tell

    script centerWindow
        property sidebarWidth : 259
        property theBoundz : missing value
        property theBoundz_1 : {163, 76, 876, 547}
        property theBoundz_2 : {260, 119, 1060, 652}
        property theBoundz_3 : {305, 73, 1126, 812}
        property theBoundz_4 : {353, 122, 1324, 868}
        property theBoundz_5 : {466, 201, 1467, 1129}

        property displayRezolution_Lowest : {0, 0, 1024, 640}
        property displayRezolution_Lower : {0, 0, 1280, 800}
        property displayRezolution_Default : {0, 0, 1440, 900}
        property displayRezolution_Higher : {0, 0, 1680, 1050}
        property displayRezolution_Highest : {0, 0, 1920, 1200}

        tell application "Finder" to set getRez to get bounds of window of desktop

        if displayRezolution_Lowest is equal to getRez then
            centerFinderWindow(theBoundz_1)
        end if
        if displayRezolution_Lower is equal to getRez then
            centerFinderWindow(theBoundz_2)
        end if
        if displayRezolution_Default is equal to getRez then
            centerFinderWindow(theBoundz_3)
        end if
        if displayRezolution_Higher is equal to getRez then
            centerFinderWindow(theBoundz_4)
        end if
        if displayRezolution_Highest is equal to getRez then
            centerFinderWindow(theBoundz_5)
        end if

        on centerFinderWindow(theBoundz)
            tell application "Finder"
                try
                    tell its Finder windows
                        set its current view to column view
                        set its bounds to theBoundz
                        delay 0.1
                        set its sidebar width to sidebarWidth
                        delay 0.1
                        set its toolbar visible to true
                        delay 0.1
                    end tell
                    tell its Finder windows
                        set its sidebar width to sidebarWidth
                    end tell
                end try
            end tell
        end centerFinderWindow
    end script
end script

script displayRezolutionHigher
    property savedBoundz6 : {{560, 530, 1120, 1050}, {1121, 22, 1680, 529}, {0, 22, 559, 529}, ¬
        {0, 530, 559, 1050}, {1121, 530, 1680, 1050}, {560, 22, 1119, 529}}
    property savedBoundz5 : {{560, 530, 1120, 1050}, {829, 22, 1680, 529}, {0, 22, 828, 529}, ¬
        {0, 530, 559, 1050}, {1121, 530, 1680, 1050}}
    property savedBoundz4 : {{829, 530, 1680, 1050}, {829, 22, 1680, 529}, {0, 22, 828, 529}, ¬
        {0, 530, 828, 1050}}
    property savedBoundz3 : {{1130, 22, 1680, 1050}, {0, 22, 551, 1050}, {552, 22, 1129, 1050}}
    property savedBoundz2 : {{834, 22, 1680, 1050}, {0, 22, 832, 1050}}

    tell application "Finder"
        if (count of every window) = 6 then
            set theBoundz to savedBoundz6
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 5 then
            set theBoundz to savedBoundz5
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 4 then
            set theBoundz to savedBoundz4
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 3 then
            set theBoundz to savedBoundz3
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 2 then
            set theBoundz to savedBoundz2
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 1 then
            run script centerWindow
        else if (count of every window) = 0 then
            return
        else if (count of every window) is greater than 6 then
            return
        end if
    end tell

    script centerWindow
        property sidebarWidth : 259
        property theBoundz : missing value
        property theBoundz_1 : {163, 76, 876, 547}
        property theBoundz_2 : {260, 119, 1060, 652}
        property theBoundz_3 : {305, 73, 1126, 812}
        property theBoundz_4 : {353, 122, 1324, 868}
        property theBoundz_5 : {466, 201, 1467, 1129}

        property displayRezolution_Lowest : {0, 0, 1024, 640}
        property displayRezolution_Lower : {0, 0, 1280, 800}
        property displayRezolution_Default : {0, 0, 1440, 900}
        property displayRezolution_Higher : {0, 0, 1680, 1050}
        property displayRezolution_Highest : {0, 0, 1920, 1200}

        tell application "Finder" to set getRez to get bounds of window of desktop

        if displayRezolution_Lowest is equal to getRez then
            centerFinderWindow(theBoundz_1)
        end if
        if displayRezolution_Lower is equal to getRez then
            centerFinderWindow(theBoundz_2)
        end if
        if displayRezolution_Default is equal to getRez then
            centerFinderWindow(theBoundz_3)
        end if
        if displayRezolution_Higher is equal to getRez then
            centerFinderWindow(theBoundz_4)
        end if
        if displayRezolution_Highest is equal to getRez then
            centerFinderWindow(theBoundz_5)
        end if

        on centerFinderWindow(theBoundz)
            tell application "Finder"
                try
                    tell its Finder windows
                        set its current view to column view
                        set its bounds to theBoundz
                        delay 0.1
                        set its sidebar width to sidebarWidth
                        delay 0.1
                        set its toolbar visible to true
                        delay 0.1
                    end tell
                    tell its Finder windows
                        set its sidebar width to sidebarWidth
                    end tell
                end try
            end tell
        end centerFinderWindow
    end script
end script

script displayRezolutionHighest
    property savedBoundz6 : {{1277, 22, 1920, 602}, {0, 22, 632, 602}, {1277, 603, 1920, 1200}, ¬
        {0, 603, 632, 1200}, {633, 603, 1276, 1200}, {633, 22, 1276, 602}}
    property savedBoundz5 : {{961, 22, 1920, 602}, {0, 22, 960, 602}, {1277, 603, 1920, 1200}, ¬
        {0, 603, 632, 1200}, {633, 603, 1276, 1200}}
    property savedBoundz4 : {{961, 22, 1920, 602}, {0, 22, 960, 602}, {961, 603, 1920, 1200}, ¬
        {0, 603, 960, 1200}}
    property savedBoundz3 : {{1277, 22, 1920, 1200}, {0, 22, 632, 1200}, {633, 22, 1276, 1200}}
    property savedBoundz2 : {{938, 22, 1920, 1200}, {0, 22, 937, 1200}}

    tell application "Finder"
        if (count of every window) = 6 then
            set theBoundz to savedBoundz6
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 5 then
            set theBoundz to savedBoundz5
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 4 then
            set theBoundz to savedBoundz4
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 3 then
            set theBoundz to savedBoundz3
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 2 then
            set theBoundz to savedBoundz2
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 1 then
            run script centerWindow
        else if (count of every window) = 0 then
            return
        else if (count of every window) is greater than 6 then
            return
        end if
    end tell

    script centerWindow
        property sidebarWidth : 259
        property theBoundz : missing value
        property theBoundz_1 : {163, 76, 876, 547}
        property theBoundz_2 : {260, 119, 1060, 652}
        property theBoundz_3 : {305, 73, 1126, 812}
        property theBoundz_4 : {353, 122, 1324, 868}
        property theBoundz_5 : {466, 201, 1467, 1129}

        property displayRezolution_Lowest : {0, 0, 1024, 640}
        property displayRezolution_Lower : {0, 0, 1280, 800}
        property displayRezolution_Default : {0, 0, 1440, 900}
        property displayRezolution_Higher : {0, 0, 1680, 1050}
        property displayRezolution_Highest : {0, 0, 1920, 1200}

        tell application "Finder" to set getRez to get bounds of window of desktop

        if displayRezolution_Lowest is equal to getRez then
            centerFinderWindow(theBoundz_1)
        end if
        if displayRezolution_Lower is equal to getRez then
            centerFinderWindow(theBoundz_2)
        end if
        if displayRezolution_Default is equal to getRez then
            centerFinderWindow(theBoundz_3)
        end if
        if displayRezolution_Higher is equal to getRez then
            centerFinderWindow(theBoundz_4)
        end if
        if displayRezolution_Highest is equal to getRez then
            centerFinderWindow(theBoundz_5)
        end if

        on centerFinderWindow(theBoundz)
            tell application "Finder"
                try
                    tell its Finder windows
                        set its current view to column view
                        set its bounds to theBoundz
                        delay 0.1
                        set its sidebar width to sidebarWidth
                        delay 0.1
                        set its toolbar visible to true
                        delay 0.1
                    end tell
                    tell its Finder windows
                        set its sidebar width to sidebarWidth
                    end tell
                end try
            end tell
        end centerFinderWindow
    end script
end script

Be sure to set the property values to your monitor's available Display Resolutions, at the top of the script

To set the size and locations (Bounds) of the Finder windows, manually position and size (with your mouse) each finder window. Then in Script Editor, run this following code then simply copy the result coordinates and paste them back into the main script

tell application "Finder" to set getRezolution to get bounds of window of desktop
tell application "Finder" to set theCount to count of every Finder window
tell application "Finder" to set theBoundz to bounds of every Finder window

enter image description here

enter image description here

Here is an example running the Automator service (which can be invoked by a keyboard shortcut) in Finder, starting with six windows, then all the way down to one window...

enter image description here

  • 1
    wtf. This is insane. Like I am in aww. – JBis Jul 17 '18 at 20:14
0

For people who are wondering what Apple has added in the mean time: you can sort of achieve a similar result with the Split Window feature: https://support.apple.com/en-us/HT204948

Except that:

  1. It is limited to two windows
  2. The windows are from two different apps
  3. The apps are put in fullscreen mode

Anyway, Apple is trying to do something about it, even if they are reinventing the wheel instead of looking at what other desktop software vendors are doing in this respect.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .