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>
This commit is contained in:
jamie 2026-02-08 18:35:59 +00:00 committed by NAHO
parent 2836f33108
commit e1180f2983
No known key found for this signature in database
GPG key ID: BFB5D5E3F4C95185

View file

@ -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;
}
);
};
}
)
];
}