From 58342373e82869b389d0d3147fff6f993db7e382 Mon Sep 17 00:00:00 2001 From: ediblerope Date: Fri, 15 May 2026 22:47:46 +0100 Subject: [PATCH] --- settings/stylix.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/settings/stylix.nix b/settings/stylix.nix index 6f23964..c18324d 100644 --- a/settings/stylix.nix +++ b/settings/stylix.nix @@ -83,12 +83,15 @@ # colored variant (folder-{color}-*.svg), symlink the generic name # (folder-*.svg) to it. No papirus-folders binary needed. papirusDark = pkgs.runCommand "papirus-dark-${closestPfColor}" {} '' - mkdir -p $out/share/icons - cp -r ${pkgs.papirus-icon-theme}/share/icons/Papirus-Dark $out/share/icons/ - chmod -R u+w $out/share/icons/Papirus-Dark + # Copy full icon tree so Papirus-Dark's ../Papirus/… symlinks resolve. + tmpthemes=$(mktemp -d) + cp -r ${pkgs.papirus-icon-theme}/share/icons/. "$tmpthemes/" + chmod -R u+w "$tmpthemes" + # Recolor folders. Papirus-Dark delegates 48x48 etc. to ../Papirus via + # symlinks, so we operate through those resolved paths in the temp tree. for size in 22x22 24x24 32x32 48x48 64x64; do - places="$out/share/icons/Papirus-Dark/$size/places" + places="$tmpthemes/Papirus-Dark/$size/places" [ -d "$places" ] || continue for f in \ "$places/folder-${closestPfColor}"-*.svg \ @@ -100,6 +103,11 @@ ln -sf "$fname" "$places/''${fname/-${closestPfColor}/}" done done + + # Copy Papirus-Dark with -L to dereference all symlinks, so the output + # is self-contained — no dangling ../Papirus/… pointers. + mkdir -p $out/share/icons + cp -rL "$tmpthemes/Papirus-Dark" $out/share/icons/ ''; # Map matugen's Material You placeholders to the closest base16 slot