Archive for October, 2024

Opening folders in new tabs in the Finder

Thursday, October 3rd, 2024

When you select a folder from Default Folder X‘s menu in your menu bar, it opens that folder in the Finder. The Finder creates a new window to show the folder’s contents, but what if you want the folder to appear in a new tab in an existing Finder window instead?

Customers have asked numerous times for an “open folders in a new tab” option in Default Folder X, but I’ve been unable to add it. The Finder doesn’t provide a way for apps to ask for a new tab instead of a new window. I’ve filed enhancement requests with Apple for an API to do this, but those have fallen on deaf ears.

In the meantime, I noticed that you can use this option in System Settings to make the Finder open folders in a new tab instead of a new window:

The problem is that it extends the behavior to every app that supports tabbed windows. I discovered that, while I want new tabs rather than new windows in the Finder, I DON’T want that behavior in any other apps. Creating a new document in Numbers and having it added as a tab rather than a new window isn’t helpful to me – nor is it in Safari, where I explicitly create new tabs when I want new tabs, and expect new windows otherwise.

But a little investigation reveals that the option in System Settings just sets a global setting in User Defaults (the macOS preferences system). So what happens if we apply that option just to the Finder’s settings? You guessed it – you get folders opening in new tabs in the Finder, but the same old behavior in all other apps.

To open new tabs in the Finder, but new windows in all other apps, open Terminal (which is in /Applications/Utilities) and enter this command:

     defaults write com.apple.finder AppleWindowTabbingMode always 

You’ll need to relaunch the Finder after doing so, either by logging out, restarting, or Control-Option-clicking on the Finder’s icon in the Dock and choosing “Relaunch” at the bottom of the menu.

To change the Finder’s behavior back to its default, use this command in Terminal:

     defaults delete com.apple.finder AppleWindowTabbingMode

and again relaunch the Finder. And that’s it! I hope this will help some people out there who’ve been unhappy with the way the Finder pops open a new window when you open a folder or reveal an item.