Default Folder X 6.1.3: Bug fixes and Quick Search integration

December 11th, 2024

Well, I’m a day late but want to share some details on the changes in the new version of Default Folder X that was released yesterday.

First, the Bug Fixes

1. The last release of Default Folder X (6.1.2) used the macOS windowserver SPI to work around a very problematic bug in Apple’s Accessibility API in Sequoia, and that turned out to be a bit touchy. Since the SPI is officially undocumented, I should’ve been even more paranoid than I was when using it. DFX wasn’t checking the size of the argument returned by some notifications, and that caused a crash in rare circumstances.

2. The improved management of Finder labels in DFX 6.1.2 wasn’t always improved. If your Finder settings lacked a list of favorite tags (or the list contained fewer than the standard 7 tags), Default Folder X would unexpectedly quit. This only affected a few people, as you had to have some pretty messed up Finder prefs for it to occur, but resulted in DFX crashing every time you used an Open dialog. My apologies – it’s fixed in version 6.1.3.

3. In Sequoia, the “Do you want to keep this new document?” Save dialogs optionally contain a popup menu for the file’s format. This confused Default Folder X, resulting in it not putting its toolbar up when it should have. That’s been corrected, so DFX will now enhance Save dialogs when apps offer a format popup (TextEdit is the only one I’m aware of at present).

4. In the process of chasing down the problems above, I also cleaned up several other bugs and sped up the construction of Default Folder X’s hierarchical menus.

I’m sorry about all that – version 6.1.2 was a bit substandard.

New Things

I did manage to actually make a couple of useful additions while chasing down bugs:

1. Quick Search can now be invoked using AppleScript or a custom URL. This is primarily useful for folks who want to access it from a keyboard macro app like Keyboard Maestro or using a launcher / shortcut utility like Raycast or Alfred. Look up the details in Default Folder X’s AppleScript dictionary, or use an URL like:

     defaultfolderx://quicksearch?SearchString

(yes, you can click on that URL if you’re already running Default Folder X 6.1.3).

2. Default Folder X does a better job of tracking recent Microsoft Word documents that are stored on OneDrive. The underlying problem is interesting: Even though your files are stored locally on your Mac, Word internally keeps track of files on OneDrive using a network URL like https://d.docs.live.net/48c889/OneDriveTest.docx. That makes sense, since the “true source” of the document is on OneDrive – the file on your Mac is just a synchronized copy of it. So Default Folder X has to translate that URL into the location of the local file on your Mac in order to use it. It’s been doing that for a while, but there are some interesting twists and turns if it’s actually stored on SharePoint, Microsoft’s corporate version of OneDrive. DFX 6.1.3 now navigates that little SharePoint maze correctly.

Please Update to Default Folder X 6.1.3

So – regardless of whether those two new things matter to you, please grab the Default Folder X 6.1.3 update to get the bug fixes. You can select “Check for Update” from Default Folder X’s menu in your menu bar, or get more details and download it from the Default Folder X What’s New page.

Default Folder X 6.1.2 – Sequoia fixes, better Finder labels and more

November 18th, 2024

A little over 2 weeks ago, version 6.1.1 of Default Folder X was released with a workaround for a bug in Sequoia. The macOS 15 Accessibility API partially fails under certain circumstances, so I resorted to using a window server SPI to provide some notifications that Default Folder X needs and was no longer getting from the Accessibility subsystem. Turns out that fix wasn’t perfect, and there were still situations where DFX wasn’t notified by the system. This resulted in various weird behaviors: Finder-click would stop working, the filename field in Save dialogs wouldn’t highlight correctly, you couldn’t Tab around in Save dialogs, DFX’s bezel wouldn’t always hide itself when a file dialog went away, and other odd, confused behavior.

After a fair amount of experimentation followed by exhaustive testing, Default Folder X 6.1.2 is ready, and corrects the problems on Sequoia. I strongly recommend that anyone using macOS 15 update to Default Folder X 6.1.2. You’re not going to lose data or anything like that if you keep using an older release, but you’ll run into annoying inconsistencies and bugs that are fixed now.

In more positive news, version 6.1.2 also includes a revamped framework for handling Finder labels. The little color bubbles are back in Default Folder X’s menus and are correct even if you’ve changed them in your Finder settings. And the Information pane shows the correct label despite iCloud doing its best to screw things up.

This release is also proactive about detecting problems caused by BetterMouse, a popular app for tweaking and enhancing your mouse. BetterMouse’s “click-through” feature changes how windows are activated in macOS, and this results in Default Folder X’s toolbar hiding itself as soon as you click on it. Not very helpful if you clicked there to use one of DFX’s menus. If that happens, you’ll see an alert with instructions to turn off click-through. Incidentally, you can also add Default Folder X to BetterMouse’s exception list and then change the click-through setting only for DFX, but that much detail is too much to fit in a tiny little alert window.

A couple of other infrequently-encountered bugs have been fixed in version 6.1.2, too, and the search results in Quick Search are now sorted with more priority on what’s been used most recently.

As always, if you’re already running Default Folder X, just choose “Check for Update” from its menu in your menu bar to see the release notes and install the new version. If you’d rather check out the release notes here and update manually, head to the Default Folder X Release page for all the details.

Default Folder X 6.1.1 improves Quick Search and other features, fixes issues with Sequoia

November 1st, 2024

A free update is available for Default Folder X 6, adding improvements to existing features and fixing a bunch of issues that have come to light since the release of macOS 15 Sequoia.

Feature Enhancements

Quick Search: The Quick Search keyboard shortcut can now be used to both show and hide the Quick Search window – a minor detail that’s actually very convenient. And when you perform a search, the priority of matching sequential characters is now higher than matching capital letters. This makes the ranking of search results more intuitive. Displaying your Quick Search results is also a little gentler on the CPU – it doesn’t madly try to generate all of the preview icons it needs all at once.

Reveal in File Dialogs: You can now reveal items in file dialogs by holding down the Command key while choosing an item from one of Default Folder X’s menus. This is handy, for example, when you want to open a file that’s in the same folder as one of the files in your Recent Files menu. Command-selecting that file will switch the file dialog to the folder that contains it.

Finder Labels: The Label menu in Default Folder X’s Information panel is now customized with your favorite labels as defined in your Finder settings, rather than showing the system’s 7 default colors. It will also correctly show the label assigned to files stored on iCloud, even though iCloud mucks with the Finder attributes and sets the stored label to “gray” for all files saved to or moved to iCloud.

Bug Fixes

Format Menu: Sequoia contains a redesigned Save As dialog that optionally puts the file format near the top of the dialog, just below the filename. This could confuse Default Folder X 6.1 – it would replace the format menu with its customized path menu, rather than replacing the system-supplied path menu like it’s supposed to. Version 6.1.1 no longer gets confused when that redesigned dialog shows up in TextEdit, Bean, Skim or any other app that uses it.

Sequoia Accessibility Bug: A much bigger issue has been a bug in Sequoia that causes part of the system’s Accessibility API to fail when multiple apps are using it. We’ve found that running either uBar or SideBar stops Sequoia from informing Default Folder X when UI elements are destroyed. This results in DFX’s controls in file dialogs failing to update; its Finder Windows menu and Finder-click feature show windows that are no longer there; and various processes within DFX fail unexpectedly. It basically just gets confused – sometimes really confused. Thanks to help from Oliver Tuerk, developer of Sidebar, and code from Åsmund Vikane, developer of Yabai, I’ve put together a workaround that allows Default Folder X to function correctly even when Sequoia doesn’t.

Finder Toolbar Buttons: Sequoia brought a minor change to the Finder’s preference file contents that could result in Default Folder X resetting the positions of its buttons in your Finder toolbar after you’ve manually rearranged them. Sorry about that – I know it’s annoying and maddening for you folks that take the time to make your Mac setup perfect. Anyway, Default Folder X deals with it now – and in the process I was surprised to run into Classic Mac OS style alias records in the Finder prefs. I had to break out a bunch of deprecated Carbon API calls to resolve those aliases 😳

Miscellaneous Other Stuff: There are also fixes for Default Folder X’s drawer not working correctly in certain Stage Manager configurations and a few graphical glitches.

More Info

As usual, there are release notes and download links on the What’s New page. Or if you’re running Default Folder X on your Mac already, just select “Check for Update” from its menu in your menu bar. You’ll get the release notes and a button to automatically download and install version 6.1.1. Thanks for using and continuing to support Default Folder X!

Opening folders in new tabs in the Finder

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.

Sequoia is nearly here – and Default Folder X 6.1 is ready for it!

September 4th, 2024

Rumor has it that macOS 15 Sequoia will be released next week at Apple’s “Glowtime” event, alongside iOS 18 and the new iPhone 16 models. Version 6.1 of Default Folder X has been in beta testing for several months and has been working well with Apple’s Sequoia betas, so I’m rolling it out in final form today.

You’ll need Default Folder X 6.1 if you’re running Sequoia – version 6.0.8 will just put up an alert saying that it doesn’t support macOS 15 – so today’s release should give many folks an opportunity to install the update before Sequoia arrives next Monday (or whenever Apple actually makes the upgrade available for download). The Default Folder X 6.1 update is free to everyone who’s already purchased a license for version 6.

In addition to Sequoia compatibility, Default Folder X 6.1 also opens favorite URLs from its Quick Search window, can open folders in the Warp terminal app, and fixes a number of bugs that cropped up in version 6.0.8. Full details and download links are on the What’s New page, or if you’re already running Default Folder X, just select “Check for Update” from its menu in your menu bar.

Sequoia’s weekly permission prompts for screen recording

August 7th, 2024

From 9to5Mac:

With macOS Sequoia this fall, using apps that need access to screen recording permissions will become a little bit more tedious. Apple is rolling out a change that will require you to give explicit permission on a weekly basis to these types of apps, and every time you reboot your Mac.

While I understand Apple’s desire to make it clear that you’ve given apps permission to record your screen, this seems like a nuisance. You have to click “Allow For One Week” each week for every app that’s actively capturing or streaming screen images. As 9to5Mac says, that’s going to get pretty tedious.

And if an app isn’t using Sequoia’s new “screen recording picker”, you’ll see this very technically worded warning. I’m not sure how non-technical users will respond to this:

Of course, the reason I’m grousing about this is because Default Folder X is affected. In some situations, DFX captures an image of an Open or Save dialog and displays it on top of the real file dialog as a “curtain” to hide what it’s doing while it manipulates the dialog. It doesn’t store or transmit the images – it just takes a screenshot of the file dialog, pops it up on the screen to obscure the dialog while it twiddles a menu, then throws away the screenshot.

Now Sequoia is throwing up scary weekly reminders about it recording “personal or sensitive information”. Sigh. Assuming that this new Sequoia “feature” is here to stay, I feel the only workable solution is to remove the screen captured façade and just put up a blank window to hide what Default Folder X is doing. This is … ugly. Here’s a quick illustration:

Here’s what Default Folder X is doing. Notice the menu popping up after opening “Empty Folder”:

 

Here’s what it currently looks like with a captured image overlayed to hide the menu activity. As intended, you don’t see anything at all:

 

Here’s what it looks like without screen recording, using a blank window to hide activity instead. There’s an unpleasant white flash:

I realize it’s not the end of the world – having that blank window flicker on the screen doesn’t change the functionality of Default Folder X. It’s just sloppy looking and aesthetically grating.

How you can take action

If you’d like to help out – and save yourself weekly warnings about the apps you use that capture screen images – please use Feedback Assistant to submit a bug about this to Apple. At the very least, they could add a “Don’t remind me again” checkbox to that warning alert and save us all from being pestered every week.

The bottom line

If Sequoia’s repeated reminders and dire warnings about privacy intrusion are here to stay, I don’t see any way forward except to eliminate the use of captured screen images. This reduces the quality and functionality of my software, but if the warnings are enough to put off some users, removing the dependent features is the only way to stop them from scaring people.

And just for the record, the use of captured screen images isn’t something new. Default Folder X and other applications have used this kind of trick for years to hide unpleasant side effects, clean up graphical glitches, or get information they can only get by looking at the screen. We’ve just come to a point where Apple feels it’s necessary to tell you about it on the off chance that some app is spying on you – which Default Folder X isn’t doing, but I do understand the potential danger.

App Tamer 2.8.4 delivers bug fixes and updates

August 6th, 2024

Version 2.8.4 of App Tamer is available now. It fixes bugs and alleviates headaches when using App Tamer in specific configurations.

Most importantly, App Tamer will no longer mess with processes that it isn’t actively controlling. In the past, if a process was stopped, App Tamer would start it running again if none of your settings in App Tamer indicated it should be stopped or slowed down. That could interfere with other apps that were controlling that process, including using Control-Z in Terminal to stop a process using zsh (or whatever shell you’re using). Now App Tamer won’t restart a process if it didn’t stop it in the first place.

There are also small changes to alert messages so that App Tamer’s suggestions are more understandable. And the Priority slider is more clearly separated from other options to show that its effects are separate from the slow / stop features. Note that you need to hold down the Option key to get the Priority slider because it’s a macOS process attribute that’s not always useful. It can help in very specific cases, but App Tamer’s other process controls are more effective.

Speaking of specific cases, you can also hold down the Option key and turn on “Stop this app completely” and “Slow down this app” at the same time. When combined with the “Also slow this app when it’s in front” checkbox, App Tamer will slow the app to the specified CPU limit when it’s in the foreground and will stop it completely when it’s not in front. Again, this is a configuration that’s useful in a few particular situations, but you can do it now – there you go.

And finally, there’s a bug fix for a very quirky issue: You could get a prompt from App Tamer to save a debug file seemingly at random if you happened to be holding down the Option key at the wrong time. (What is it with the Option key in this release?) Anyway, that’s fixed and won’t happen anymore.

A full change history and download links are available on the App Tamer release page. If you’re already running an earlier version of App Tamer, just choose “Check for Update” from the menu in the lower right corner of its window.

Customizing the suggested filename in Save dialogs

July 25th, 2024

I got a request from a Default Folder X user yesterday, asking if I could add a feature to limit the length of the default filename supplied in Save As dialogs. Apparently, the cloud services and backup software that he and his colleagues use can’t handle filenames longer than 45 characters, so he wants to make sure they don’t save files with names longer than that. That’s a pretty unfortunate limitation of the software they’re using (I mean really, in 2024?), but I’m all for avoiding stupid problems.

I’ve addressed a similar request before, automatically prepending dates to the names of files as you save them. This post is an update, because Default Folder X now has a better way to handle this than the method described in that earlier post.

Background

Default Folder X has a flexible, AppleScript-based method for handling customized default folders and filenames in Save dialogs. Yeah, I know AppleScript is old and crufty, but it’s available on every Mac, can interoperate with other apps, and allows you to cobble together just about anything, so it’s a good solution here. Anyway, when a file dialog appears on the screen, Default Folder X looks for and runs special AppleScripts if they’re present, allowing you to use any logic you want to determine the starting location (the “default folder”) for a file dialog, and the name of the file suggested in Save As dialogs.

The AppleScripts should be located in this folder:

     ~/Library/Application Support/com.stclairsoft.DefaultFolderX5/Scripts/

where the ‘~’ character denotes your home folder. Default Folder X looks for scripts with predetermined names, depending on their purpose:

  • getDefaultFilename.scpt – modifies the suggested filename in Save As dialogs
  • getDefaultFolder.scpt – specifies the default folder for an Open or Save dialog

Note that the scripts must be saved with those names in order for them to work. If you want a script to only run in the Open and Save dialogs of a single application, put it in a subfolder with the same name as the app. For example, to have scripts that only run in Safari, save them in:

     ~/Library/Application Support/com.stclairsoft.DefaultFolderX5/Scripts/Safari/

The implementation details (the name of the AppleScript handler and the arguments that Default Folder X passes to it) are included at the beginning of each of these sample scripts:

Truncating Long Filenames

OK, back to the task at hand. In this case, we want to provide a “getDefaultFilename” handler that truncates the default filename in Save dialogs to no more than “maxLength” characters.

Here’s the AppleScript:

on getDefaultFilename(appName, suggestedName, fileExtension)

  -- Specify our maximum filename length
  set maxLength to 45
  
  -- Make sure the filename extension isn't counted
  set addExtension to false
  if fileExtension is not "" and suggestedName ends with fileExtension then
    set suggestedName to text 1 thru -((count fileExtension) + 2) of suggestedName
    set addExtension to true
  end if
  
  -- Truncate the filename
  if length of suggestedName is greater than maxLength then
    set newName to text 1 thru maxLength of suggestedName
  else
    set newName to suggestedName
  end if
  
  -- Add the extension back on if appropriate
  if addExtension is true then
    set newName to newName & "." & fileExtension
  end if
  
  -- And give the name to Default Folder X
  return newName

end getDefaultFilename

Enter the code above in Script Editor and save it as an AppleScript script or download GetDefaultFilename.zip. Save the “GetDefaultFilename.scpt” file in this location:

     ~/Library/Application Support/com.stclairsoft.DefaultFolderX5/Scripts/

Each time a Save As dialog appears, it will magically truncate any filenames longer than 45 characters. Note that you can still edit the name afterwards in the Save dialog if you don’t like the one created by the script.

Credit Where Credit is Due

This scheme originated with an idea from Jason Snell (of Six Colors and The Incomparable fame) when he needed to customize the way Default Folder X worked in his podcasting workflow. I later expanded it as requests came in for customized filenames as well, and Bo Engelbrecht’s email reminded me that I’d never blogged about those updates. Thanks Jason and Bo!

Default Folder X 6.1b3 beta: Support for Warp, bug fixes and less frequent reminders from Sequoia

July 24th, 2024

The third beta build of Default Folder X 6.1 is available, adding support for the Warp terminal app and fixing several bugs that occurred in the previous beta (and in Default Folder X 6.0.8).

The other notable change is that this build won’t trigger Sequoia’s screen recording reminders nearly as often. Sequoia puts these up several times a day if an app is capturing screen images, which Default Folder X does as part of its normal functioning. Contrary to what this alert implies, DFX isn’t doing anything nefarious, just making its manipulations of Open and Save dialogs less jarring. The details are here. I’ve reduced the frequency of the reminders by abandoning Default Folder X’s automatic detection of dark / light mode in individual Open and Save dialogs, which required capturing an image from the screen.

To explain a bit: Some apps (including QuickTime Player, Affinity Photo, Affinity Designer and Rogue Amoeba Fission) let you change their appearance separately from the system-wide light / dark mode setting. There’s no generic way for another app like Default Folder X to tell which appearance they’re using other than taking a visual snapshot of one of the app’s file dialogs and checking to see whether it’s dark or light. I know that may sound stupid, but that’s the way macOS works – and honestly, for most normal, stand-alone applications this capability isn’t necessary, so I can understand why Apple doesn’t provide any sort of API to query an app’s appearance mode.

Anyway, without that information, Default Folder X may end up with the wrong light / dark mode for its toolbar around a file dialog, as well as for some of the controls within it – like this:

It doesn’t change the functionality that you get from Default Folder X, but it’s a bit jarring – and ugly. So, that’s the tradeoff – to stop Sequoia from whining at you every day, Default Folder X has to be less capable (and yes, I’ve filed a bug with Apple, but unless they get a lot of complaints I don’t think they’ll change this “feature” in Sequoia).

Default Folder X attempts to detect these situations using a different, application-specific method, and will currently do the right thing with the above-mentioned apps (QuickTime, Affinity apps and Fission). If you encounter this mismatch in other apps, let me know at DefaultFolderX@stclairsoft.com and I’ll do my best to find a way to detect the appearance for that app.

Grumble.

At any rate, a full change history and download links for Default Folder X 6.1b3 are available on the Beta Testing page.

Public beta Default Folder X 6.1b2 supports Sequoia and refines web favorites

July 12th, 2024

There’s a new public beta of Default Folder X 6.1 available! In addition to updated compatibility with macOS 15 Sequoia, it improves support for web URLs that have been added as favorites. It also fixes a couple of graphical bugs.

The most useful change is the ability to go to URLs in your favorites using Quick Search. Type a bit of the name of a favorite and hit Return to open it in your browser.

Display of web URLs is better in the Favorites section of Default Folder X’s settings, and an issue with selected text appearing in the wrong color has also been fixed there. Flickering of previews in Open dialogs has also been corrected.

Note that you don’t need to be running Sequoia to use the beta – it will run on macOS 11 Big Sur and later. A full list of changes and download links is available on the Default Folder X Testing page.