mirror of
https://github.com/vinceliuice/Colloid-icon-theme.git
synced 2026-08-25 20:32:33 -07:00
Link shared icon dirs to cut install size for accent variants
The accent color only affects the folder icons in apps and places. Every other directory (actions, categories, devices, emblems, mimetypes, status) is identical to the default theme of the same scheme and color, but install.sh was copying all of them again for each accent variant. This symlinks those directories to the default theme instead of copying them. A full default-scheme install (-t all) goes from 763M to 259M with identical icon output. When the default theme isn't installed (e.g. a single -t variant) it falls back to copying, so standalone installs still work.
This commit is contained in:
+16
@@ -142,6 +142,22 @@ install() {
|
||||
ln -sf status status@2x
|
||||
)
|
||||
|
||||
# Only the folder icons (apps, places) change with the accent color, so the
|
||||
# other directories are identical to the default theme of the same scheme and
|
||||
# color. Link them instead of keeping a full copy per accent variant. This is
|
||||
# skipped when the default theme isn't installed (e.g. a single -t variant).
|
||||
if [[ "${theme}" != '' && "${color}" != '' ]]; then
|
||||
local BASE_DIR="${dest}/${name}${scheme}${color}"
|
||||
if [[ -d "${BASE_DIR}" ]]; then
|
||||
for dir in actions categories devices emblems mimetypes status; do
|
||||
if [[ -d "${THEME_DIR}/${dir}" && ! -L "${THEME_DIR}/${dir}" ]]; then
|
||||
rm -rf "${THEME_DIR}/${dir}"
|
||||
ln -sf "../${name}${scheme}${color}/${dir}" "${THEME_DIR}/${dir}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
gtk-update-icon-cache "${THEME_DIR}"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user