Toggling Hidden Files in macOS except it's actually good





Happy Valentines Day. I’ve been trying to migrate from Forklift back to Finder since I’m not super happy with their progress and the issues that come with a non-native file manager, including but not limited to:

One thing I did miss was having a toolbar button for showing hidden files.

The Keyboard Shortcut

CMD + SHIFT + .

I’m going to be honest with you, I use this so infrequently that I don’t think there’s a chance in hell I’ll go 6 months without Googling this a couple times. And it’s different on Every. Single. OS. Alt + ., Ctrl + H, hell, why not Ctrl + Shift + Alt + Super + F12 + 2 next?

The “Automatic” Method

Does having all your Finder windows killed every time you want to toggle hidden files sound fun? No? Well apparently Stack Overflow thinks so because it’s the only other suggestion I’ve seen. I’m not even going to bother reposting it here because I think it’s that fucking awful. That is not a solution.

Why Did They Name The App “Shortcuts”

Oh yeah, Apple added that “Shortcuts” app huh? Too bad nobody really seems to care or talk about it, because it’s actually pretty decent. It’s also really hard to find anything relating to it online because the name is absolutely horrible.

Did you mean?: Keyboard shortcuts

Unfortunately, it ALSO has no ability to toggle hidden files. Or does it? We DO have the ability to run AppleScript, and combining a little bit of every approach, we get the following:

on run {input, parameters}
	activate application "Finder"
	tell application "System Events" to keystroke "." using {command down, shift down}
	return input
end run

You’ll need to give both Shortcuts and siriactionsd Accessibility permissions. I think there might also be something you need to enable to use AppleScript. Here’s a pre-made shortcut if you’d like.

“But you said you wanted a toolbar button!”

Here’s a secret: you can turn any shortcut into a .app by right clicking on it and selecting “Add to Dock”. You’ll likely want to remove it from the dock after, and you’ll be able to find it in ~/Applications. I moved mine into a subfolder I named “Finder Toolbar”.

Here’s ANOTHER secret: you can add any .app to your Finder toolbar. Simply enter customization mode and drag the app in.

Apple sure does love to include useful features and never explain them, huh?



Comments are currently disabled.


Enable Comments

By enabling comments, you agree to allow this website to connect to Cusdis and to the Cusdis Privacy Policy.