Skip to content

Instantly share code, notes, and snippets.

@kjyv
Created July 20, 2020 21:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjyv/1b55058ac17d70273e23485965375814 to your computer and use it in GitHub Desktop.
Save kjyv/1b55058ac17d70273e23485965375814 to your computer and use it in GitHub Desktop.
Hide macOS Finder quick action panel for common file types
#!/bin/bash
for key in "com\.apple\.application" "public\.font" "public\.folder" "public\.html" "com\.adobe\.pdf" "public\.audio" "public\.text" "public\.movie" "com\.apple\.alias-file" "public\.image" "public\.archive" "public\.item"; do
plutil -replace PreviewPaneSettings.$key.showQuickActions -bool NO ~/Library/Preferences/com.apple.finder.plist
done
@chrisspiegl
Copy link

Hi, I just found this and it's quite helpful. Sadly it only updates / inserts the showQUickActions bool only if the parent already exists in the plist file.

I wonder if there would be a way to also create the public.font key for example? I tried with insert but not much luck.

👍

@kjyv
Copy link
Author

kjyv commented Nov 26, 2021

Hi. You might want to check $man plutil, there is also -insert which should do the trick

@chrisspiegl
Copy link

I tried fiddling with that as mentioned before, but apparently the -insert only works if the parent exists. So it's inserting the public.font and then also inserting the showQUickActions. Which ended up too much work and I just looked for different files and did the change manually for the few files.

I just hoped that maybe a script like this could automate it for new installations in the future. Possibly with lookup / check if key exists / if not crate / if exists replace etc…

But that's just too much optimization for like 10 minutes of manual stuff 🙈.

Great to learn about anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment