Cannot set permanent Finder window size

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?


Solution 1:

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

Solution 2:

The common trick stops working when you open a new Finder window starting at a folder you've never viewed before—a location that doesn't have any Finder window info saved. You could replicate this by making a new folder on your desktop and then double clicking it to open in a Finder window. You'll see the size has been reset.

I'm pretty sure the "real", permanent Finder default is hard-coded into the Finder binary. I've seen stuff hinting towards that within Hopper.

Here's the next best thing—you can set up an Automator service that quickly resets the front Finder window to your preferred size:

  1. Open Automator, and create a new Quick Action / Service.
  2. Set "Service receives no input in Finder"
  3. Add a "Run Applescript" block.
  4. Paste in: tell application "System Events" to tell application process "Finder" to set size of front window to {770, 460}

Edit {770, 460} to your preferred width and height, respectively. Note that you can find a Finder window's current size by running the following in Script Editor: tell application "System Events" to tell application process "Finder" to get the size of front window.

When you're done, save your Service with a name like "Reset Finder Window Size". You can also go into System Preferences > Keyboard > Shortcuts > Services and assign your Service to a keyboard shortcut.

The first time you run the service, it will likely fail. To fix, open System Preferences > Security & Privacy > Automation and grant Finder the ability to control System Events.