2026-04-13 21:03:00 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
# Generated by matugen — recolors Adwaita folder icons with wallpaper palette
|
|
|
|
|
# and pulls in Papirus mimetype icons for better file type distinction
|
|
|
|
|
ICON_DIR="$HOME/.local/share/icons/WallpaperAdwaita"
|
|
|
|
|
ADWAITA="/run/current-system/sw/share/icons/Adwaita"
|
|
|
|
|
PAPIRUS="/run/current-system/sw/share/icons/Papirus-Dark"
|
|
|
|
|
|
|
|
|
|
mkdir -p "$ICON_DIR/scalable/places"
|
|
|
|
|
|
2026-04-13 21:08:07 +01:00
|
|
|
# Create index.theme with all mimetype sizes
|
2026-04-13 21:03:00 +01:00
|
|
|
cat > "$ICON_DIR/index.theme" << 'THEME'
|
|
|
|
|
[Icon Theme]
|
|
|
|
|
Name=WallpaperAdwaita
|
|
|
|
|
Comment=Adwaita with wallpaper-colored folders and Papirus mimetypes
|
|
|
|
|
Inherits=Adwaita,hicolor
|
|
|
|
|
DisplayDepth=32
|
|
|
|
|
|
|
|
|
|
[scalable/places]
|
|
|
|
|
Size=128
|
|
|
|
|
MinSize=16
|
|
|
|
|
MaxSize=512
|
|
|
|
|
Type=Scalable
|
|
|
|
|
Context=Places
|
|
|
|
|
|
2026-04-13 21:08:07 +01:00
|
|
|
[16x16/mimetypes]
|
|
|
|
|
Size=16
|
|
|
|
|
Type=Fixed
|
|
|
|
|
Context=MimeTypes
|
|
|
|
|
|
|
|
|
|
[22x22/mimetypes]
|
|
|
|
|
Size=22
|
|
|
|
|
Type=Fixed
|
|
|
|
|
Context=MimeTypes
|
|
|
|
|
|
|
|
|
|
[32x32/mimetypes]
|
|
|
|
|
Size=32
|
|
|
|
|
Type=Fixed
|
|
|
|
|
Context=MimeTypes
|
|
|
|
|
|
|
|
|
|
[48x48/mimetypes]
|
|
|
|
|
Size=48
|
|
|
|
|
Type=Fixed
|
|
|
|
|
Context=MimeTypes
|
|
|
|
|
|
2026-04-13 21:03:00 +01:00
|
|
|
[64x64/mimetypes]
|
|
|
|
|
Size=64
|
2026-04-13 21:08:07 +01:00
|
|
|
MinSize=32
|
|
|
|
|
MaxSize=128
|
|
|
|
|
Type=Scalable
|
|
|
|
|
Context=MimeTypes
|
|
|
|
|
|
|
|
|
|
[96x96/mimetypes]
|
|
|
|
|
Size=96
|
|
|
|
|
MinSize=64
|
|
|
|
|
MaxSize=256
|
|
|
|
|
Type=Scalable
|
|
|
|
|
Context=MimeTypes
|
|
|
|
|
|
|
|
|
|
[128x128/mimetypes]
|
|
|
|
|
Size=128
|
|
|
|
|
MinSize=64
|
2026-04-13 21:03:00 +01:00
|
|
|
MaxSize=512
|
|
|
|
|
Type=Scalable
|
|
|
|
|
Context=MimeTypes
|
|
|
|
|
THEME
|
|
|
|
|
|
|
|
|
|
# Recolor all Adwaita place SVGs with wallpaper palette
|
|
|
|
|
for svg in "$ADWAITA/scalable/places"/*.svg; do
|
|
|
|
|
name=$(basename "$svg")
|
|
|
|
|
sed \
|
|
|
|
|
-e 's/#438de6/{{colors.primary_container.default.hex}}/gi' \
|
|
|
|
|
-e 's/#62a0ea/{{colors.primary_fixed_dim.default.hex}}/gi' \
|
|
|
|
|
-e 's/#a4caee/{{colors.primary_fixed.default.hex}}/gi' \
|
|
|
|
|
-e 's/#afd4ff/{{colors.primary_fixed.default.hex}}/gi' \
|
|
|
|
|
-e 's/#c0d5ea/{{colors.primary_fixed.default.hex}}/gi' \
|
|
|
|
|
"$svg" > "$ICON_DIR/scalable/places/$name"
|
|
|
|
|
done
|
|
|
|
|
|
2026-04-13 21:08:07 +01:00
|
|
|
# Copy Papirus mimetype icons at all available sizes
|
|
|
|
|
for size in 16x16 22x22 32x32 48x48 64x64 96x96 128x128; do
|
|
|
|
|
if [ -d "$PAPIRUS/$size/mimetypes" ]; then
|
2026-04-13 21:09:21 +01:00
|
|
|
rm -rf "$ICON_DIR/$size/mimetypes"
|
2026-04-13 21:08:07 +01:00
|
|
|
mkdir -p "$ICON_DIR/$size/mimetypes"
|
2026-04-13 21:09:21 +01:00
|
|
|
cp -rL "$PAPIRUS/$size/mimetypes"/* "$ICON_DIR/$size/mimetypes/"
|
2026-04-13 21:08:07 +01:00
|
|
|
fi
|
|
|
|
|
done
|
2026-04-13 21:03:00 +01:00
|
|
|
|
|
|
|
|
# Update icon cache
|
|
|
|
|
gtk-update-icon-cache -f "$ICON_DIR" 2>/dev/null || true
|