I have programmatically replaced an app's icon with the icon from another app (see code below). Now I want the change to propagate (visually) right away™ … But the former app still keeps showing the old icon in Finder, Dock and Application Switcher.
Q: Is there a way to force the system to immediately reflect this icon change? Preferably by means of entering some code in my shell.
Here's an example script showing what I did:
# copy-terminal-app-icon-to-iterm.sh
# ----------------------------------
# First backup original iTerm icon
mv /Applications/iTerm.app/Contents/Resources/iTerm.icns /Applications/iTerm.app/Contents/Resources/iTerm-original.icns
# Then make iTerm use the same icon as Terminal.app
cp /Applications/Utilities/Terminal.app/Contents/Resources/Terminal.icns /Applications/iTerm.app/Contents/Resources/iTerm.icns
Can I add something in this script to make it "kick in" right away?
I tried killall Finder
but that didn't affect anything. And this answer didn't work for me either. (Besides, that question is targeted towards updating Dock whereas mine is Finder-/system-wide).