mklement0 / fileicon

macOS CLI for managing custom icons for files and folders

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to prevent the icons from being replaced?

sharpordie opened this issue · comments

I use script like this to install all my applications.

brew install fileicon
brew install --cask insomnia --no-quarantine

TMP_ICON_FILE="$(mktemp -d)/insomnia.icns"
curl -L 'https://media.macosicons.com/parse/files/macOSicons/6604f86ac67345dd79c2b7fc6c610c92_1619687821107.icns' -o "${TMP_ICON_FILE}"
fileicon set '/Applications/Insomnia.app' "${TMP_ICON_FILE}"

But I have to change the icon every time I update the application.

Do you know a way to fix this or maybe add a feature to fileicon.

I can see how reassigning icons to a file every time it is replaced is cumbersome, but I'm not aware of a way around that.

I suppose you'll have to perform this reassignment as part of your update procedure.

(Note that assigning the icon to a symlink that is itself never replaced is not an option, because icons cannot be assigned to symlinks.)

I'm closing this, but if there's a potential approach that I'm overlooking, we can revisit.