MacOS – Cannot set permanent Finder window size

defaultsfindermacos

The following, How to set default finder window size?, works for about a day, then the finder window size reverts to the usual small window. Is there a way to put it in stone that the finder window size shouldn't change? Through Terminal perhaps?

Best Answer

Personally I think this AppleScript solution may be a good fit for your needs.

STEP 1: Close all of your Finder windows then open a new Finder window and set its size and position to what you would like your default window size and position to be.

STEP 2: Open Script Editor.app and create a new document.

STEP 3: Insert this following code into that new document… tell application "Finder" to set windowBounds to bounds of Finder window 1 and run the code …This will retrieve the coordinates for the location and size of that Finder window

STEP 4: In Script Editor.app, create a second new document and insert this following code… tell application "Finder" to set bounds of Finder windows to then paste the coordinates that you copied from the first script… as demonstrated in this following animation.

You can test that it works the way you want it to by clicking the run button. If all is well, save that second document as an application. I named mine “Default Size”

enter image description here

STEP 5: Open a Finder Window, and while holding the command key, drag your new application to the menu bar in your Finder Window. Now anytime you want in any open Finder window, simply click the app that you just created. This is demonstrated in the next animation.

Be sure to grant the appropriate privileges for your new app in Security Preferences

enter image description here

Depending upon how much time you feel like investing in automating Finder, there’s no limit to some of the detailed scripts you can create to control the Finder.

For example, I like all of my Finder windows displayed as column view with the side bar set to an exact width. I also have Finder set to open new windows in tabs. But occasionally other apps open Finder windows in a new window and next thing I know I have 5 or 6 Finder Windows opened… some of which are in tabs and with different views etc.

So I decided to build on the code I supplied in this post. My version centers the Finder windows, sets them all to column view and sets their side bar width then merges all windows to tabs.

For my extended version of this code to work, first I needed to assign a keyboard shortcut in System Preferences, for the “Merge All Windows” menu item in Finder because by default, that menu item does not already have a keyboard shortcut.

enter image description here

Here is my version of the code. As you can see in the following animation, each Finder window has a different view and some have no side bars.

property windowNames : missing value

tell application "Finder"
    activate
    set windowsRef to a reference to Finder windows
    set windowNames to name of windowsRef
    set collapsed of windowsRef to false
    tell windowsRef
        set current view to column view
        set bounds to {383, 112, 1108, 735}
    end tell
    repeat with thisWindow in windowNames
        select Finder window thisWindow
        delay 0.1
        tell Finder window thisWindow to set sidebar width to 250
        delay 0.1
    end repeat
end tell

tell application "System Events" to tell process "Finder"
    set frontmost to true
    repeat until frontmost
        delay 0.1
    end repeat
    delay 0.1
    key code 123 using {option down} -- ⌥ ←
end tell

enter image description here