11.stylix/modules/mako/hm.nix
Karun Sandhu a6eff346d8
treewide: adjust notification colors to represent urgency (#1253)
Closes: https://github.com/nix-community/stylix/issues/1247
Link: https://github.com/nix-community/stylix/pull/1253

Reviewed-by: Mateus Auler <mateus@auler.dev>
Approved-by: https://github.com/TheMaxMur
Reviewed-by: awwpotato <awwpotato@voidq.com>
Reviewed-by: Flameopathic <64027365+Flameopathic@users.noreply.github.com>
Reviewed-by: Daniel Thwaites <danth@danth.me>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-06-25 22:41:21 +02:00

44 lines
1.1 KiB
Nix

{ mkTarget, lib, ... }:
mkTarget {
name = "mako";
humanName = "Mako";
# Referenced https://github.com/stacyharper/base16-mako
configElements = [
(
{ fonts }:
{
services.mako.settings.font = "${fonts.sansSerif.name} ${toString fonts.sizes.popups}";
}
)
(
{ colors, opacity }:
{
services.mako =
let
makoOpacity = lib.toHexString (builtins.ceil (opacity.popups * 255));
in
with colors.withHashtag;
{
settings = {
background-color = base00 + makoOpacity;
border-color = base0D;
text-color = base05;
progress-color = "over ${base02}";
"urgency=low" = {
background-color = "${base00}${makoOpacity}";
border-color = base03;
text-color = base05;
};
"urgency=high" = {
background-color = "${base00}${makoOpacity}";
border-color = base08;
text-color = base05;
};
};
};
}
)
];
}