DinkDonk/kitty-icon

Scripted icon replacement

Closed this issue · 3 comments

😻

Wow! These icons are infinitely better than the default Kitty icon! I can't believe the Kitty project hasn't adopted one of these as its default!

The only improvement I can think of is providing a way to update the Kitty icon entirely from a shell. Is that possible?

Thank you for the compliment!
Sure, there's a way to update the icon from the console.
The icon is just a file living inside the directory structure of the application.

You could do it by copying the new icon like this:

cp kitty-dark.icns /Applications/kitty.app/Contents/Resources/kitty.icns

Then delete the icon cache and restart Dock:

rm /var/folders/*/*/*/com.apple.dock.iconcache; killall Dock

Thanks, but I was hoping for something that does everything.

This is off the top of my head, totally untested, but I envision it being something like this:

#!/usr/bin/env zsh

(
  cd /tmp
  git clone git@github.com:DinkDonk/kitty-icon.git
  cd kitty-icon
  cp kitty-dark.icns /Applications/kitty.app/Contents/Resources/kitty.icns
  rm /var/folders/*/*/*/com.apple.dock.iconcache; killall Dock
  cd ..
)

The reason for scripting it is because the icon is lost every time Kitty is updated, so manual steps become more tedious everything they must be carried out.

The scripted approach mentioned above will not work in later versions of macOS. The only known way to do it from the terminal is through the third party script/application fileicon, which can be installed via homebrew