For years now I've had a macro to resize the name column of the front Finder window (in list-view) to fit — with a Hot Key Trigger.
For those who don't know — by double-clicking on the resize-widget between the column-headers, you can cause the leftmost column to resize to fit its longest element.
The macro is faster if the AppleScript is a compiled script, and I have provided one in a zip file along with the Keyboard Maestro macro. (You can open the script in the Script Editor to see what it's doing.)
This macro will only work with Yosemite (10.10.x) at this time.
On my system it's even faster than the Mavericks version was.
As far as I can see, option-double-clicking on column the separators no longer resizes all columns, it only resizes one column to fit. So this may not actually solve the original problem.
Thanks Chris, I just came back to this after thinking I almost found a solution it seems like this AppleScript should work but doesn't.
tell application "Finder"
set listView to target of front Finder window
set the current view of front Finder window to list view
set width of column id name column of list view options of front Finder window to 400
set width of column id modification date column of list view options of front Finder window to 150
--etc.
close front Finder window
open listView
end tell
I put your AppleScript in my Dropbox folder so it syncs across multiple Macs and added change Finder to List View. Not sure if either of those ideas present other problems though.
----------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2018/01/04 20:10
# dMod: 2018/01/04 20:16
# Appl: Finder
# Task: Adjust widths of the name column and the mod date column in the front window.
# Libs: None
# Osax: None
# Tags: @ccstone, @Applescript, @Script, @Finder, @Adjust, @Widths, @Name, @Column, @Modification, @Date, @Front, @Window
----------------------------------------------------------------
property nameColumnWidth : 400
property modDateColumnWidth : 150
----------------------------------------------------------------
set otherTarget to path to favorites folder -- For use in getting the view to reset.
tell application "Finder"
set winTarget to target of front window as alias
tell front window
if its current view ≠ list view then set its current view to list view
tell its list view options
set width of column id name column to nameColumnWidth
set width of column id modification date column to modDateColumnWidth
end tell
-- etc.
set target to otherTarget
delay 0.05
set target to winTarget
end tell
end tell
----------------------------------------------------------------
Just implemented this. After years of being frustrated by the narrow columns. Don't know what took me so long to search KM.
However I can't seem to change "nameColumnWidth." Seems to be stuck on the initial 400 value that you had. I'm going to restart Finder and see if that helps. No change. I'll play with it. I am trying for something like 250 width. Maybe it has something to do with the fact that I've added your script to an "Activate Finder" action.
The change to 400 seems to be permanent. If I open a new Finder window, it comes up 400. If I close all Finder windows, open a new one, reduce the first column to say 50 pixels and open another Finder window it comes up 400. Better than the tiny width I had before.
I also tried running the script from Script Editor. Wouldn't work if no window was opened and if a window was opened it changed that window to 400.
I keep coming back to this and curious if anyone has a solution to this age old problem. It has never consistenly worked and I have had to use Keyboard Maestro to bypass errors I get. I have not been able to have this work in Sonoma MacOS 14 at all. I really wish Apple would implement a preference to auto resize name column to show all the file names full width. Yes this would mean it constantly resizes but that's okay it's a preference after all.
Maybe some of you are using List View, but if you use Column View, it's simple: just have your macro option-double-click the separator using Found Image.
Been doing this since 2019 (on Monterey 12.7 at the moment):