From e1180f298327aed21cf6fa9a38cda10067bc4940 Mon Sep 17 00:00:00 2001 From: jamie Date: Sun, 8 Feb 2026 18:35:59 +0000 Subject: [PATCH] dank-material-shell/hm: add font and opacity configurations Link: https://github.com/nix-community/stylix/pull/2194 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> --- modules/dank-material-shell/hm.nix | 96 ++++++++++++++++++------------ 1 file changed, 58 insertions(+), 38 deletions(-) diff --git a/modules/dank-material-shell/hm.nix b/modules/dank-material-shell/hm.nix index c8e8d148..b25c5adb 100644 --- a/modules/dank-material-shell/hm.nix +++ b/modules/dank-material-shell/hm.nix @@ -6,42 +6,62 @@ ... }: mkTarget { - config = lib.optionals (options.programs ? dank-material-shell) ( - { colors }: - { - programs.dank-material-shell.settings = { - currentThemeName = "custom"; - customThemeFile = - let - theme = with colors.withHashtag; { - name = "Stylix"; - primary = base0D; - primaryText = base00; - primaryContainer = base0C; - secondary = base0E; - surface = base01; - surfaceText = base05; - surfaceVariant = base02; - surfaceVariantText = base04; - surfaceTint = base0D; - background = base00; - backgroundText = base05; - outline = base03; - surfaceContainer = base01; - surfaceContainerHigh = base02; - surfaceContainerHighest = base03; - error = base08; - warning = base0A; - info = base0C; - }; - in - pkgs.writeText "dankMaterialShell-stylix-color-theme.json" ( - builtins.toJSON { - dark = theme; - light = theme; - } - ); - }; - } - ); + config = lib.optionals (options.programs ? dank-material-shell) [ + ( + { fonts }: + { + programs.dank-material-shell.settings = { + fontFamily = fonts.sansSerif.name; + monoFontFamily = fonts.monospace.name; + }; + } + ) + ( + { opacity }: + { + programs.dank-material-shell.settings = { + popupTransparency = opacity.popups; + dockTransparency = opacity.desktop; + }; + } + ) + ( + { colors }: + { + programs.dank-material-shell.settings = { + currentThemeName = "custom"; + customThemeFile = + let + theme = with colors.withHashtag; { + name = "Stylix"; + primary = base0D; + primaryText = base00; + primaryContainer = base0C; + secondary = base0E; + surface = base01; + surfaceText = base05; + surfaceVariant = base02; + surfaceVariantText = base04; + surfaceTint = base0D; + background = base00; + backgroundText = base05; + outline = base03; + surfaceContainer = base01; + surfaceContainerHigh = base02; + surfaceContainerHighest = base03; + error = base08; + warning = base0A; + info = base0C; + }; + in + pkgs.writeText "dankMaterialShell-stylix-color-theme.json" ( + builtins.toJSON { + dark = theme; + light = theme; + } + ); + }; + } + ) + ]; }