dank-material-shell/hm: add font and opacity configurations (#2194)

Link: https://github.com/nix-community/stylix/pull/2194

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
NAHO 2026-02-08 22:58:26 +01:00 committed by GitHub
commit 72e6483a88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 59 additions and 38 deletions

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

View file

@ -3,6 +3,7 @@
stylix.testbed.ui = {
graphicalEnvironment = "hyprland";
command.text = "dms run";
sendNotifications = true;
};
home-manager.sharedModules = lib.singleton {