stylix/modules/mako/hm.nix

34 lines
1 KiB
Nix
Raw Normal View History

{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 {
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
config = lib.optionalAttrs (options.services ? mako) (lib.mkIf config.stylix.targets.mako.enable {
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}";
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}
'';
};
});
2022-07-20 18:41:42 +00:00
}