aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2020-11-11 04:52:14 +0100
committerTeddy Wing2020-11-11 19:14:42 +0100
commitc015b2cd236e687915ce7e1b89e6aa0fcba0db62 (patch)
tree8cc000d478514e800d66a59edb3d064a12d1dc27
parent0ceb2a0a13fa13ad45a608f85d4cc1e568169452 (diff)
downloadmacosx-replace-system-icons-c015b2cd236e687915ce7e1b89e6aa0fcba0db62.tar.bz2
icons.sh: Set Dock icons
Dock.app needs to be changed to include the Finder and both states of the Trash icon. Learned how to convert .icns files to PNG from: https://www.junian.net/tech/icns-to-png/
-rwxr-xr-xicons.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/icons.sh b/icons.sh
index e422c3e..8be365b 100755
--- a/icons.sh
+++ b/icons.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+DOCK=/System/Library/CoreServices/Dock.app
+
CORE_TYPES=/System/Library/CoreServices/CoreTypes.bundle
IO_STORAGE_FAMILY=/System/Library/Extensions/IOStorageFamily.kext
@@ -16,6 +18,7 @@ sudo -v
# Backup system files
NOW=$(date +%Y-%m-%dT%H:%M:%S%z)
+sudo tar czf "${DOCK}.backup-${NOW}.tar.gz" "$DOCK"
sudo tar czf "${CORE_TYPES}.backup-${NOW}.tar.gz" "$CORE_TYPES"
sudo tar czf "${IO_STORAGE_FAMILY}.backup-${NOW}.tar.gz" "$IO_STORAGE_FAMILY"
sudo tar czf "${IO_SCSI_ARCHITECTURE_MODEL_FAMILY}.backup-${NOW}.tar.gz" "$IO_SCSI_ARCHITECTURE_MODEL_FAMILY"
@@ -23,7 +26,22 @@ sudo tar czf "${IO_CD_STORAGE_FAMILY}.backup-${NOW}.tar.gz" "$IO_CD_STORAGE_FAMI
sudo tar czf "${IO_DVD_STORAGE_FAMILY}.backup-${NOW}.tar.gz" "$IO_DVD_STORAGE_FAMILY"
sudo tar czf "${IO_BD_STORAGE_FAMILY}.backup-${NOW}.tar.gz" "$IO_BD_STORAGE_FAMILY"
-# TODO: /System/Library/CoreServices/Dock.app/Contents/Resources/
+# Dock icons
+sips -s format png --resampleHeightWidthMax 128 "${REPLACEMENT}/TrashIcon.icns" --out /tmp/trashempty.png
+sips -s format png --resampleHeightWidthMax 256 "${REPLACEMENT}/TrashIcon.icns" --out '/tmp/trashempty@2x.png'
+
+sips -s format png --resampleHeightWidthMax 128 "${REPLACEMENT}/FullTrashIcon.icns" --out /tmp/trashfull.png
+sips -s format png --resampleHeightWidthMax 256 "${REPLACEMENT}/FullTrashIcon.icns" --out '/tmp/trashfull@2x.png'
+
+sips -s format png --resampleHeightWidthMax 128 "${REPLACEMENT}/FinderIcon.icns" --out /tmp/finder.png
+sips -s format png --resampleHeightWidthMax 256 "${REPLACEMENT}/FinderIcon.icns" --out '/tmp/finder@2x.png'
+
+sudo cp -f /tmp/trashempty.png "${DOCK}/Contents/Resources/"
+sudo cp -f '/tmp/trashempty@2x.png' "${DOCK}/Contents/Resources/"
+sudo cp -f /tmp/trashfull.png "${DOCK}/Contents/Resources/"
+sudo cp -f '/tmp/trashfull@2x.png' "${DOCK}/Contents/Resources/"
+sudo cp -f /tmp/finder.png "${DOCK}/Contents/Resources/"
+sudo cp -f '/tmp/finder@2x.png' "${DOCK}/Contents/Resources/"
# Set icons
read -r -d '' icons <<'EOF'