3

Changing app icons in macOS keeps getting harder, especially since Big Sur where a lot of the best icon management apps no longer work, and the newer apps all seem a bit flakey and unreliable. Other methods I've tried, such as finding and replacing .icns files inside an app, also cause issues.

I know you can no longer change system app icons easily, but changing App Store and other third party app icons can still be achieved most reliably and consistently with the good old fashioned process of doing "get info" on an app and dragging a .icns file onto the existing icon in that window.

There must be a way of doing this same thing from the terminal? Is anyone able to suggest a way of achieving this? It's a pain keeping custom icons every time apps update themselves. Thanks

1
  • Would love to find an easy way to do this. Once managed to change the app icon for a Brave browser shortcut but then after update the SSB icon changed and I can't change it again, not with any combination of tools or tricks. I'm on Monterey 12.1 Commented Jul 29, 2022 at 10:02

2 Answers 2

1

The biggest trick that I don't have an answer for is how to identify the current file used by an app. Right now I have a list and it runs through that...

e.g. MS Word uses MSWD.icns, Rider uses rider.icns, Outlook uses Outlook.icns, Slack uses electron.icns, etc.

The following snippet can be used to update the icon for a given app:

# $ICON_PATH = /full/path/to/current/icon.icns
# $NEW_ICON_FILE = /full/path/to/new/icon.icns
# $APP_PATH = /full/path/to/App.app

sudo cp "${ICON_PATH}" "${ICON_PATH}.bak"
sudo cp "${NEW_ICON_FILE}" "${ICON_PATH}"
sudo touch "${APP_PATH}"
sudo rm -rf /Library/Caches/com.apple.iconservices.store
sudo killall Dock

Wrap it in a function & then you can script:

set-app-icon "/full/path/to/App.app" "/full/path/to/current/icon.icns" "/full/path/to/new/icon.icns"

There are a few apps I've come across that require a quit + restart (killing Dock doesn't do it. This seems to be the JetBrains apps that are currently running), but after quitting + opening, new icons are reflected.

========

As said at the beginning, I'm looking for a way to cut out the need to find /full/path/to/current/icon.icns manually, so you just pass in the .app & new icon file. Will come back to update this if I find anything (current thread is looking for CFBundleIconFile, but it doesn't look like all apps have this...)

========

You can get the current icon file with the following command: defaults read /path/to/App.app/Contents/Info CFBundleIconFile. You can also use /usr/libexec/PlistBuddy, but I'm not sure the differences between these approaches.

0

If you don't mind install another CLI, fileicon is the only solution I found that is actually working.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .