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;
|
(builtins.tail ranked)).name;
|
||||||
|
|
||||||
# Papirus-Dark with folders recolored to the closest matching color.
|
# Papirus-Dark with folders recolored to the closest matching color.
|
||||||
# Built as a derivation so it lands in the nix store — no activation scripts.
|
# Replicates papirus-folders' change_color logic directly: for each
|
||||||
papirusDark = pkgs.runCommand "papirus-dark-${closestPfColor}" {
|
# colored variant (folder-{color}-*.svg), symlink the generic name
|
||||||
nativeBuildInputs = [ pkgs.papirus-folders ];
|
# (folder-*.svg) to it. No papirus-folders binary needed.
|
||||||
} ''
|
papirusDark = pkgs.runCommand "papirus-dark-${closestPfColor}" {} ''
|
||||||
# Copy theme to a writable temp dir and pass its absolute path to
|
cp -r ${pkgs.papirus-icon-theme}/share/icons/Papirus-Dark $out
|
||||||
# papirus-folders so it bypasses XDG lookup entirely.
|
chmod -R u+w $out
|
||||||
themedir=$(mktemp -d)/Papirus-Dark
|
|
||||||
cp -r ${pkgs.papirus-icon-theme}/share/icons/Papirus-Dark "$themedir"
|
|
||||||
chmod -R u+w "$themedir"
|
|
||||||
|
|
||||||
papirus-folders -C ${closestPfColor} -t "$themedir"
|
for size in 22x22 24x24 32x32 48x48 64x64; do
|
||||||
|
places="$out/$size/places"
|
||||||
mkdir -p $out/share/icons
|
[ -d "$places" ] || continue
|
||||||
cp -r "$themedir" $out/share/icons/Papirus-Dark
|
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
|
# Map matugen's Material You placeholders to the closest base16 slot
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue