theming: YAMIS app icons under Papirus-Fred

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017EHJfY5Q72punsWX38nY1w
This commit is contained in:
rope 2026-08-21 14:25:34 +01:00
parent a0cd304e53
commit cb7b576a71

View file

@ -293,6 +293,32 @@ let
''misc={background_color="rgb(${s.base00})"}'' ''misc={background_color="rgb(${s.base00})"}''
] + "})"); ] + "})");
# ── App icons ──────────────────────────────────────────────────────────
# YAMIS draws the app icons in the launcher. Picked over the far bigger
# monochrome sets because coverage beats library size: it is the only one
# still shipping commits, so it has the apps actually installed here
# (zen, ghostty, vesktop, bazaar, faugus, protonplus) where the 10k-icon
# archives — Suru++ Asprómauros, dead since 2019 — do not.
#
# Not in nixpkgs. Upstream is a bare icon tree with the theme at its root,
# so the "build" is a copy into the directory name the spec resolves by.
#
# FollowsColorScheme=true is a KDE key: only Plasma rewrites the embedded
# <style id="current-color-scheme"> block. Anywhere else — quickshell and
# GTK here — the icons render at that block's literal fallback, #d8dee9,
# a cool light grey that reads on every wallpaper's dark bar. Tinting per
# wallpaper would mean a sed over all 6101 files per theme, so the app
# icons deliberately stay one fixed colour while the folders track.
yamisIcons = pkgs.runCommand "yamis-icon-theme" { } ''
mkdir -p $out/share/icons
cp -r ${pkgs.fetchgit {
url = "https://bitbucket.org/dirn-typo/yet-another-monochrome-icon-set.git";
rev = "4294d5d51f896e54de3f01c12ed35a46d9451258";
hash = "sha256-oVztgqlGB8qkOlJU7HCWXT8BBZLAHHajdws6FIe33XA=";
}} $out/share/icons/yet-another-monochrome-icon-set
chmod -R u+w $out/share/icons
'';
# A featherweight icon theme that inherits Papirus-Dark and overrides only # A featherweight icon theme that inherits Papirus-Dark and overrides only
# the folder faces, rather than a recoloured copy of the whole 200MB tree # the folder faces, rather than a recoloured copy of the whole 200MB tree
# per wallpaper. Papirus-Dark delegates its size dirs to ../Papirus by # per wallpaper. Papirus-Dark delegates its size dirs to ../Papirus by
@ -304,8 +330,12 @@ let
{ {
echo "[Icon Theme]" echo "[Icon Theme]"
echo "Name=Papirus-Fred" echo "Name=Papirus-Fred"
echo "Comment=Papirus-Dark with ${color} folders" echo "Comment=YAMIS app icons with ${color} Papirus folders"
echo "Inherits=Papirus-Dark,Papirus,hicolor" # YAMIS first, so every app it covers wins; its own index.theme falls
# through to Papirus-Dark for the rest. Papirus is repeated here
# anyway — an upstream edit to YAMIS's Inherits must not be able to
# break the fallback that the folder overrides below depend on.
echo "Inherits=yet-another-monochrome-icon-set,Papirus-Dark,Papirus,hicolor"
printf 'Directories=' printf 'Directories='
first=1 first=1
for size in $sizes; do for size in $sizes; do
@ -575,6 +605,11 @@ in
apply = themeApply; apply = themeApply;
}; };
# Papirus-Fred inherits this by name, so it has to be on the icon search
# path for the lookup to resolve — installing the theme is what makes the
# Inherits= line above mean anything.
environment.systemPackages = [ yamisIcons ];
home-manager.users.fred = { config, lib, pkgs, osConfig, ... }: { home-manager.users.fred = { config, lib, pkgs, osConfig, ... }: {
# These targets write build-time files that theme-apply replaces at # These targets write build-time files that theme-apply replaces at
# runtime; leaving them on means stylix and the switcher fight over the # runtime; leaving them on means stylix and the switcher fight over the