How to set default Finder window size for *all* situations?
There are tons of posts about that (like How to set default finder window size?), but none are able to change the default size everywhere, including shared network folders from a Windows PC.
So when I open a network folder through Finder / Connect to Server with a smb:// address, the opened Finder size is always very small (around 770x440 px), regardless of the "remembered" size I did with the Cmd+Resize+Relaunch trick I see everywhere.
I am on Mac OS X 10.11 (El Capitan), but it never worked in past OS X versions either.
I search a lot in com.apple.finder.plist
file (under the folder ~/Library/Preferences
) to found the answer but I can't.
I think the best option to do what you want is to create an AppleScript and use it as a service with automator.
I know that is not what you want, but it's a solution to change window's size for the active window with a shortcut.
We will use the Applescript below (more about this Applescript here)
on run
tell application "Finder"
activate
set bounds of front window to {0, 100, 490, 248}
end tell
end run
How to create the Service with Automator
-
Open Automator and Select Service
Search for
AppleScript
and double click onRun AppleScript
In
Service Receives
set tono input
inany application
Copy the Script below and paste it in Automator
Don't forget to save your service (cmd+s)
Assign a shortcut for your service
- Go to System Preferences / Keyboard / Shortcuts
- From the left sidebar select Services
- Find your service and add a shortcut (e.x. cmd+shift+w)
Now open your folder, press cmd+shift+w
and the window's bounds will be change to {0, 100, 490, 248}
More Informations about BoundsProperty, to create your own here
Update:
Here's the AppleScript to choose your own width and height for the window without changing the destination from the side of the screen. Just change myWindowWidth
and myWindowHeight
. Also I have some other variables in comment to understand the code. Please reply if you have any question!
on run
tell application "Finder"
activate
--we take the bounds properties of the front window
set windowAreaDimensions to bounds of the front window
set x1 to item 1 of windowAreaDimensions
set y1 to item 2 of windowAreaDimensions
set x2 to item 3 of windowAreaDimensions
set y2 to item 4 of windowAreaDimensions
set destToLeft to x1
set destToTop to y1
--set destToRight to x2
--set destToBottom to y2
--set previousWindowWidth to destToRight - destToLeft
--set peviousWindowHeight to destToBottom - destToTop
set myWindowWidth to 730
set myWindowHeight to 521
set sameWidth to destToLeft + myWindowWidth
set sameHeight to destToTop + myWindowHeight
--The following line script return the bounds of the front window
--get the bounds of the front window
--The following line set our bounds for the front window
set bounds of front window to {destToLeft, destToTop, sameWidth, sameHeight}
end tell
end run