11.stylix/modules/mako/hm.nix
Shahar "Dawn" Or 7566bc0150
mako: don't use criteria option (#1264)
Deprecated by 0be2c246e3

Link:  https://github.com/danth/stylix/pull/1264

Reviewed-by: awwpotato <awwpotato@voidq.com>
Reviewed-by: Mateus Auler <mateus@auler.dev>
2025-05-15 20:19:03 -07:00

44 lines
1.2 KiB
Nix

{
config,
lib,
options,
...
}:
{
options.stylix.targets.mako.enable =
config.lib.stylix.mkEnableTarget "Mako" true;
# Referenced https://github.com/stacyharper/base16-mako
config = lib.optionalAttrs (options.services ? mako) (
lib.mkIf (config.stylix.enable && config.stylix.targets.mako.enable) {
services.mako =
let
makoOpacity = lib.toHexString (
((builtins.ceil (config.stylix.opacity.popups * 100)) * 255) / 100
);
inherit (config.stylix) fonts;
in
with config.lib.stylix.colors.withHashtag;
{
settings = {
background-color = base00 + makoOpacity;
border-color = base0D;
text-color = base05;
progress-color = "over ${base02}";
font = "${fonts.sansSerif.name} ${toString fonts.sizes.popups}";
"urgency=low" = {
background-color = "${base00}${makoOpacity}";
border-color = base0D;
text-color = base0A;
};
"urgency=high" = {
background-color = "${base00}${makoOpacity}";
border-color = base0D;
text-color = base08;
};
};
};
}
);
}