2023-05-20 10:42:03 +00:00
|
|
|
{pkgs, config, lib, options, ... }:
|
2022-07-20 18:41:42 +00:00
|
|
|
|
|
|
|
with config.lib.stylix.colors.withHashtag;
|
|
|
|
with config.stylix.fonts;
|
2023-05-18 19:00:50 +00:00
|
|
|
let
|
|
|
|
makoOpacity = lib.toHexString ((((builtins.ceil (config.stylix.opacity.popups * 100)) * 255) / 100));
|
|
|
|
in {
|
2022-08-03 09:49:27 +00:00
|
|
|
options.stylix.targets.mako.enable =
|
|
|
|
config.lib.stylix.mkEnableTarget "Mako" true;
|
|
|
|
|
2022-07-20 18:41:42 +00:00
|
|
|
# Referenced https://github.com/stacyharper/base16-mako
|
2023-05-20 10:42:03 +00:00
|
|
|
config = lib.optionalAttrs (options.services ? mako) (lib.mkIf config.stylix.targets.mako.enable {
|
2023-03-23 18:06:59 +00:00
|
|
|
services.mako = {
|
2023-05-18 19:00:50 +00:00
|
|
|
backgroundColor = base00 + makoOpacity;
|
2022-07-20 18:41:42 +00:00
|
|
|
borderColor = base0D;
|
|
|
|
textColor = base05;
|
|
|
|
progressColor = "over ${base02}";
|
2023-03-19 18:39:32 +00:00
|
|
|
font = "${sansSerif.name} ${toString sizes.popups}";
|
2022-07-20 18:41:42 +00:00
|
|
|
# I wish the mako hm module was like the dunst one
|
|
|
|
extraConfig = ''
|
|
|
|
[urgency=low]
|
2023-05-18 19:00:50 +00:00
|
|
|
background-color=${base00}${makoOpacity}
|
2022-07-20 18:41:42 +00:00
|
|
|
border-color=${base0D}
|
|
|
|
text-color=${base0A}
|
|
|
|
|
|
|
|
[urgency=high]
|
2023-05-18 19:00:50 +00:00
|
|
|
background-color=${base00}${makoOpacity}
|
2022-07-20 18:41:42 +00:00
|
|
|
border-color=${base0D}
|
|
|
|
text-color=${base08}
|
|
|
|
'';
|
2024-01-25 08:45:05 +00:00
|
|
|
};
|
2023-05-20 10:42:03 +00:00
|
|
|
});
|
2022-07-20 18:41:42 +00:00
|
|
|
}
|