├── .gitattributes ├── AppIconInstaller.sh └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /AppIconInstaller.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | backupFolder="./backup/" # Change this path to choose your own backup location 4 | echo This tool isn't able to change system app icons 5 | echo Make sure app icons have the same name as the application you\'re trying to replace 6 | echo You have to restart applications inside your dock to see updates 7 | 8 | 9 | if [[ ! -d $backupFolder ]]; then 10 | mkdir -p "$backupFolder" 11 | fi 12 | 13 | ls *.icns | while read newIcn; do 14 | appName="${newIcn%.icns*}" 15 | systemApp="" 16 | 17 | if [[ -d "/System/Applications/"$appName".app/Contents" ]]; then 18 | systemApp="/System" 19 | elif [[ ! -d "/Applications/"$appName".app/Contents" ]]; then 20 | echo Skipped $appName because icon not found 21 | continue 22 | fi 23 | 24 | icn=`defaults read "$systemApp"/Applications/"$appName".app/Contents/info CFBundleIconFile` 25 | 26 | if [[ ! $icn == *".icns" ]]; then 27 | icn="$icn".icns 28 | fi 29 | 30 | if [[ ! -e "$backupFolder"/"$newIcn" ]]; then 31 | sudo mv "$systemApp"/Applications/"$appName".app/Contents/Resources/"$icn" "$backupFolder"/"$newIcn" 32 | else 33 | echo "Backup icon for $appName already exists" 34 | fi 35 | 36 | sudo cp "$newIcn" "$systemApp"/Applications/"$appName".app/Contents/Resources/ 37 | sudo mv "$systemApp"/Applications/"$appName".app/Contents/Resources/"$newIcn" "$systemApp"/Applications/"$appName".app/Contents/Resources/"$icn" 38 | 39 | sudo touch "$systemApp"/Applications/"$appName".app 40 | 41 | done 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MacAppIconSwitcher 2 | Switches yout Mac Application Icons 3 | 4 | ## TODO 5 | - Make it so that the names of the icons don't have to be exactly the same as the app 6 | - Fix an issue with system app icons 7 | 8 | ## Preparation 9 | - Place AppIconInstaller.sh inside the folder with your app icons 10 | - The names of the icons must be exactly the same as the app in this initial version 11 | - Don't worry about the backup folder, if one doesn't exist, it will be created 12 | 13 | ## Running 14 | 1. Open terminal and run AppIconInstaller.sh 15 | - If you are unsure how to run it type "cd " then drag folder containing AppIconInstaller.sh onto the terminal line, this will automatically input the path name. 16 | - Then once your directory has been changed, run ``` sh AppIconInstaller.sh``` 17 | 2. Type in your password when prompted 18 | 19 | ## Reverting 20 | - To undo the action and return the images to their originals, just move AppIconInstaller.sh into the backup folder and re-run the script 21 | - FYI When rerun in the backup folder, it will create another backup folder with the icons that its replacing 22 | --------------------------------------------------------------------------------