feat: icon themes — Papirus, resolved from the JSON, for GTK + rofi
Ships papirus-icon-theme and resolves an icon-theme name once in theme.nix → nomarchy.theme.iconTheme: the JSON's optional `icons` field, else Papirus-Dark/Light picked by `mode`. That single value feeds: - Stylix `stylix.icons` → gtk.iconTheme (Thunar and GTK apps) - rofi `show-icons` + `icon-theme` (the launcher now shows app icons) A preset or theme-state.json can set `icons` to any theme in the icon package to override per theme. Verified: flake check green; iconTheme resolves Papirus-Dark for tokyo-night and Papirus-Light for summer-day; gtk.enable true with gtk.iconTheme.name set; papirus in home.packages and the live ISO closure; rofi config.rasi carries icon-theme + show-icons:true. The rendered icons need a real session to see. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -131,7 +131,8 @@ in
|
||||
|
||||
extraConfig = {
|
||||
modi = "drun,run";
|
||||
show-icons = false; # no icon theme shipped yet — clean text list
|
||||
show-icons = true; # app icons via the theme's icon set
|
||||
icon-theme = t.iconTheme; # resolved in theme.nix (Papirus-*/per-theme)
|
||||
drun-display-format = "{name}";
|
||||
display-drun = "apps";
|
||||
display-run = "run";
|
||||
|
||||
@@ -55,6 +55,17 @@ in
|
||||
size = lib.mkDefault 24;
|
||||
};
|
||||
|
||||
# GTK/file-manager/rofi icon theme, resolved from the JSON in
|
||||
# theme.nix (per-theme `icons`, else Papirus-Dark/Light by mode).
|
||||
# Stylix sets gtk.iconTheme from this; both dark/light point at the
|
||||
# already-mode-resolved name.
|
||||
icons = {
|
||||
enable = true;
|
||||
package = lib.mkDefault pkgs.papirus-icon-theme;
|
||||
dark = t.iconTheme;
|
||||
light = t.iconTheme;
|
||||
};
|
||||
|
||||
fonts = {
|
||||
monospace = {
|
||||
name = t.fonts.mono;
|
||||
|
||||
@@ -44,11 +44,24 @@ let
|
||||
blur = true;
|
||||
shadow = true;
|
||||
};
|
||||
# Icon theme name; "" means "pick by mode" (resolved below). A preset
|
||||
# or the state file can name any theme in the shipped icon package.
|
||||
icons = "";
|
||||
};
|
||||
|
||||
parsed = lib.recursiveUpdate defaults themeState;
|
||||
|
||||
# Resolve the icon theme once and expose it on nomarchy.theme so both
|
||||
# the GTK side (stylix.nix) and rofi (rofi.nix) agree. The shipped
|
||||
# package (papirus-icon-theme) carries the Dark/Light pair.
|
||||
iconTheme =
|
||||
if parsed.icons != "" then parsed.icons
|
||||
else if parsed.mode == "light" then "Papirus-Light"
|
||||
else "Papirus-Dark";
|
||||
in
|
||||
{
|
||||
config = {
|
||||
nomarchy.theme = lib.recursiveUpdate defaults themeState;
|
||||
nomarchy.theme = parsed // { inherit iconTheme; };
|
||||
|
||||
nomarchy.lib = {
|
||||
# "#7aa2f7" -> "rgb(7aa2f7)" (Hyprland color syntax)
|
||||
|
||||
Reference in New Issue
Block a user