This commit is contained in:
parent
19813ee0b1
commit
f7f8e531be
1 changed files with 19 additions and 13 deletions
|
|
@ -79,20 +79,26 @@
|
|||
(builtins.tail ranked)).name;
|
||||
|
||||
# Papirus-Dark with folders recolored to the closest matching color.
|
||||
# Built as a derivation so it lands in the nix store — no activation scripts.
|
||||
papirusDark = pkgs.runCommand "papirus-dark-${closestPfColor}" {
|
||||
nativeBuildInputs = [ pkgs.papirus-folders ];
|
||||
} ''
|
||||
# Copy theme to a writable temp dir and pass its absolute path to
|
||||
# papirus-folders so it bypasses XDG lookup entirely.
|
||||
themedir=$(mktemp -d)/Papirus-Dark
|
||||
cp -r ${pkgs.papirus-icon-theme}/share/icons/Papirus-Dark "$themedir"
|
||||
chmod -R u+w "$themedir"
|
||||
# Replicates papirus-folders' change_color logic directly: for each
|
||||
# colored variant (folder-{color}-*.svg), symlink the generic name
|
||||
# (folder-*.svg) to it. No papirus-folders binary needed.
|
||||
papirusDark = pkgs.runCommand "papirus-dark-${closestPfColor}" {} ''
|
||||
cp -r ${pkgs.papirus-icon-theme}/share/icons/Papirus-Dark $out
|
||||
chmod -R u+w $out
|
||||
|
||||
papirus-folders -C ${closestPfColor} -t "$themedir"
|
||||
|
||||
mkdir -p $out/share/icons
|
||||
cp -r "$themedir" $out/share/icons/Papirus-Dark
|
||||
for size in 22x22 24x24 32x32 48x48 64x64; do
|
||||
places="$out/$size/places"
|
||||
[ -d "$places" ] || continue
|
||||
for f in \
|
||||
"$places/folder-${closestPfColor}"-*.svg \
|
||||
"$places/folder-${closestPfColor}.svg" \
|
||||
"$places/user-${closestPfColor}"-*.svg \
|
||||
"$places/user-${closestPfColor}.svg"; do
|
||||
[ -f "$f" ] || continue
|
||||
fname=$(basename "$f")
|
||||
ln -sf "$fname" "$places/''${fname/-${closestPfColor}/}"
|
||||
done
|
||||
done
|
||||
'';
|
||||
|
||||
# Map matugen's Material You placeholders to the closest base16 slot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue