From 7db8dabf8f3755c155588440705739aff708f04b Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 4 Oct 2023 01:01:29 +0000 Subject: [PATCH] theming: ship HighContrast icon theme as default current gnome.adwaita-icon-theme doesn't generate all icons when cross-compiled this may be fixed in GNOME 45. until then, HighContrast gets us *most* icons --- TODO.md | 2 + hosts/modules/gui/gtk.nix | 95 ++++++++++++++++++++++++++---- hosts/modules/gui/sway/default.nix | 11 +++- 3 files changed, 94 insertions(+), 14 deletions(-) diff --git a/TODO.md b/TODO.md index ece85973..e0b83e5d 100644 --- a/TODO.md +++ b/TODO.md @@ -77,6 +77,8 @@ - this will require some patching to handle `exec ` style - maybe: save original PATH and reset it before invoking user files - moby: theme GTK apps (i.e. non-adwaita styles) + - combine multiple icon themes to get one which has the full icon set? + - get adwaita-icon-theme to ship everything even when cross-compiled? - especially, make the menubar collapsible - try Gradience tool specifically for theming adwaita? - phog: remove the gnome-shell runtime dependency to save hella closure size diff --git a/hosts/modules/gui/gtk.nix b/hosts/modules/gui/gtk.nix index f708ee0a..517fb825 100644 --- a/hosts/modules/gui/gtk.nix +++ b/hosts/modules/gui/gtk.nix @@ -184,27 +184,96 @@ let # then determine the name here by building and `ls result/share/icons` # this misses quite a few icon themes that aren't Adwaita-based. # for those, try `nix-locate share/icons`? + # + # note that adwaita apps expect exactly the icon set provided by adwaita-icon-theme: + # - most icon themes are supplementary to adwaita, rather than a full replacement. + # - i.e. most themes, unless adwaita is also installed, will cause some missing icons inside apps. + # - that's probably why so many themes here also symlink Adwaita + # my accounting of "adwaita coverage" seems to be overoptimistic somehow + # maybe some apps bundle adwaita themselves Adwaita = gnome.adwaita-icon-theme; - Arc = arc-icon-theme; # 4.5/5, meh icon for "vertical ellipsis". - HighContrast = gnome.gnome-themes-extra; # gtk-3.0 - Humanity = humanity-icon-theme; - Humanity-Dark = humanity-icon-theme; - Numix = numix-icon-theme; # 4/5, meh icon for "back". - Numix-Light = numix-icon-theme; - Paper = paper-icon-theme; # 4/5, weird icon for "info". - Paper-Mono-Dark = paper-icon-theme; - Pop = pop-icon-theme; # 5/5 - Tela-circle = tela-circle-icon-theme; - Tela-circle-dark = tela-circle-icon-theme; - Tela-circle-light = tela-circle-icon-theme; - elementary-xfce = elementary-xfce-icon-theme; + Arc = arc-icon-theme; # 4.5/5, meh icon for "vertical ellipsis". 3/5 adwaita coverage + elementary-xfce = elementary-xfce-icon-theme; # does not cross compile (2023/10/03) elementary-xfce-dark = elementary-xfce-icon-theme; elementary-xfce-darker = elementary-xfce-icon-theme; elementary-xfce-darkest = elementary-xfce-icon-theme; + HighContrast = gnome.gnome-themes-extra; # 5/5. 5/5 adwaita coverage (4/5 cross) + Humanity = humanity-icon-theme; # 5/5. 5/5 adwaita coverage (3.5/5 cross, unique in which icons work) + Humanity-Dark = humanity-icon-theme; kora = kora-icon-theme; kora-light = kora-icon-theme; kora-light-panel = kora-icon-theme; kora-pgrey = kora-icon-theme; + Numix = numix-icon-theme; # 4/5, meh icon for "back". + Numix-Light = numix-icon-theme; + Paper = paper-icon-theme; # 4/5, weird icon for "info". 5/5 adwaita coverage (3.5 cross, highly unique in which icons work) + Paper-Mono-Dark = paper-icon-theme; + Pop = pop-icon-theme; # 5/5. 2/5 adwaita coverage + Tela-circle = tela-circle-icon-theme; + Tela-circle-dark = tela-circle-icon-theme; + Tela-circle-light = tela-circle-icon-theme; + + # themes which don't symlink Adwaita + BeautyLine = beauty-line-icon-theme; # 3.5/5. 4/5 adwaita coverage + breeze = breeze-icons; + breeze-dark = breeze-icons; + Mint-X = cinnamon.mint-x-icons; + # 10-ish other Mint-X variants omitted + # cinnamon.mint-l-icons; + # cinnamon.mint-y-icons; + Colloid = colloid-icon-theme; # 4.5/5, thin. 5/5 adwaita coverage (3/5 cross) + Colloid-dark = colloid-icon-theme; + Colloid-light = colloid-icon-theme; + bloom = deepin.deepin-icon-theme; + # 4 other deepin editions omitted + Dracula = dracula-icon-theme; # 4.5/5, a little thin. 4.5/5 adwaita coverage + Faba = faba-icon-theme; # 4/5. 4/5 adwaita coverage + Faba-Mono = faba-mono-icons; + Faba-Mono-Dark = faba-mono-icons; + Flat-Remix-Grey-Light = flat-remix-icon-theme; # 5/5. 5/5 adwaita coverage. builds on breeze, elementary + # 20-ish other flat-remix editions omitted + Fluent = fluent-icon-theme; # 5/5, though thin. 5/5 adwaita coverage (3/5 cross) + Fluent-dark = fluent-icon-theme; + gnome = gnome-icon-theme; # 3/5, icons are colored. 3/5 adwaita coverage + hicolor = hicolor-icon-theme; # 2/5 adwaita coverage; using this forces application builtin icons + la-capitaine-icon-theme = la-capitaine-icon-theme; # 4.5/5. 4.5/5 adwaita coverage. builds upon elementary + Luna = luna-icons; + # 5 other Luna variants omitted + maia = maia-icon-theme; # 3/5, icons are colored. 2/5 adwaita coverage + maia-dark = maia-icon-theme; + # mate.mate-icon-theme-faenza + mate = mate.mate-icon-theme; # 4.5/5. 4/5 adwaita coverage + menta = mate.mate-icon-theme; + Moka = moka-icon-theme; # 3/5, icons are colored. 3/5 adwaita coverage + # nixos-icons; + Nordzy = nordzy-icon-theme; # 5/5, thin. 5/5 adwaita coverage (3/5 cross) + # 10-ish Nordzy editions omitted + # numix-icon-theme-circle + # numix-icon-theme-square + oomox-gruvbox-dark = gruvbox-dark-icons-gtk; + Oranchelo = oranchelo-icon-theme; + # 3 other oranchelo editions omitted + elementary = pantheon.elementary-icon-theme; # 4.5/5. 4.5/5 adwaita coverage + Papirus = papirus-icon-theme; # 5/5. 5/5 adwaita coverage + # 4 other Papirus editions omitted + # papirus-maia-icon-theme + Qogir = qogir-icon-theme; # 5/5, thin. 5/5 adwaita coverage (2.5/5 cross) + # 5 other Qogir variants omitted + rose-pine = rose-pine-icon-theme; + rose-pine-dawn = rose-pine-icon-theme; # 5/5. 5/5 adwaita coverage (2.5 cross). looks a lot like Flat Remix... + rose-pine-moon = rose-pine-icon-theme; + SuperTinyIcons = super-tiny-icons; # 4/5. 2/5 adwaita coverage + Tango = tango-icon-theme; # 2/5. 3/5 adwaita coverage -- mostly just forwards to gnome-icon-theme + Tela = tela-icon-theme; # 5/5. 5/5 adwaita coverage + # 30-ish other Tela editions omitted + Vimix = vimix-icon-theme; + # 15-ish other Vimix editions omitted + WhiteSur = whitesur-icon-theme; # 4.5/5, thin & like iOS. 5/5 adwaita coverage (3.5/5 cross) + WhiteSur-dark = whitesur-icon-theme; + Rodent = xfce.xfce4-icon-theme; + Zafiro-icons-Dark = zafiro-icons; + Zafiro-icons-Light = zafiro-icons; # 5/5. 5/5 adwaita coverage + }; }; in diff --git a/hosts/modules/gui/sway/default.nix b/hosts/modules/gui/sway/default.nix index 6dd1efaa..b2a350d0 100644 --- a/hosts/modules/gui/sway/default.nix +++ b/hosts/modules/gui/sway/default.nix @@ -197,7 +197,16 @@ in sane.gui.gtk.enable = lib.mkDefault true; # sane.gui.gtk.gtk-theme = lib.mkDefault "Fluent-Light-compact"; sane.gui.gtk.gtk-theme = lib.mkDefault "Tokyonight-Light-B"; - sane.gui.gtk.icon-theme = lib.mkDefault "Pop"; + sane.gui.gtk.icon-theme = lib.mkDefault "HighContrast"; # 4/5 coverage on moby + # sane.gui.gtk.icon-theme = lib.mkDefault "WhiteSur"; # 3.5/5 coverage on moby, but it provides a bunch for Fractal/Dino + # sane.gui.gtk.icon-theme = lib.mkDefault "Humanity"; # 3.5/5 coverage on moby, but it provides the bookmark icon + # sane.gui.gtk.icon-theme = lib.mkDefault "Paper"; # 3.5/5 coverage on moby, but it provides the bookmark icon + # sane.gui.gtk.icon-theme = lib.mkDefault "Nordzy"; # 3/5 coverage on moby + # sane.gui.gtk.icon-theme = lib.mkDefault "Fluent"; # 3/5 coverage on moby + # sane.gui.gtk.icon-theme = lib.mkDefault "Colloid"; # 3/5 coverage on moby + # sane.gui.gtk.icon-theme = lib.mkDefault "Qogir"; # 2.5/5 coverage on moby + # sane.gui.gtk.icon-theme = lib.mkDefault "rose-pine-dawn"; # 2.5/5 coverage on moby + # sane.gui.gtk.icon-theme = lib.mkDefault "Flat-Remix-Grey-Light"; # requires qtbase # swap in these lines to use SDDM instead of `services.greetd`. # services.xserver.displayManager.sddm.enable = true;