From 5c45c861b7da81f0f7bf4ef66840f5c4a6b52b62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atay=20=C3=96zcan?= Date: Mon, 22 Jun 2026 22:22:51 +0200 Subject: [PATCH 1/2] 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. --- install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/install.sh b/install.sh index cbd4d371..54b6971a 100755 --- a/install.sh +++ b/install.sh @@ -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}" } From 0761779f8a7fe60663705e2424d63dc1afaef489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atay=20=C3=96zcan?= Date: Mon, 22 Jun 2026 22:31:31 +0200 Subject: [PATCH 2/2] Also share unchanged dirs across schemes when installing -s all The non-folder directories are identical for every scheme of the same light/dark color, not just within one scheme. Link them to the global default theme when it exists, and fall back to the scheme default so a single-scheme install (the AUR split packages) still dedupes. --- install.sh | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 54b6971a..a6539833 100755 --- a/install.sh +++ b/install.sh @@ -142,17 +142,24 @@ 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 + # Only the folder icons (apps, places) change with the scheme and accent + # color. Every other directory is identical for all variants of the same + # light/dark color, so link them to the default theme instead of keeping a + # full copy per variant. Prefer the global default (covers -s all), fall back + # to the scheme default (covers a single scheme), and skip linking when no + # default is present so a standalone -t variant still installs in full. + if [[ "${color}" != '' ]]; then + local base= + if [[ ( "${theme}" != '' || "${scheme}" != '' ) && -d "${dest}/${name}${color}" ]]; then + base="${name}${color}" + elif [[ "${theme}" != '' && -d "${dest}/${name}${scheme}${color}" ]]; then + base="${name}${scheme}${color}" + fi + if [[ -n "${base}" ]]; 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}" + ln -sf "../${base}/${dir}" "${THEME_DIR}/${dir}" fi done fi