nix/home/file/mako/default.nix

35 lines
940 B
Nix
Raw Normal View History

{
__findFile,
2024-11-04 04:37:29 +03:00
config,
pkgs,
2024-11-04 04:37:29 +03:00
...
}: let
alpha = config.module.style.opacity.hex;
color = config.module.style.color;
2024-11-11 13:10:39 +03:00
max = 5;
2024-11-04 04:37:29 +03:00
in {
file = (pkgs.formats.iniWithGlobalSection { }).generate "MakoConfig" {
globalSection = {
anchor = "top-center";
background-color = "#${color.hl}${alpha}";
2024-11-04 04:37:29 +03:00
border-color = "#${color.border}${alpha}";
default-timeout = 10000;
font = "${config.module.style.font.serif.name} ${toString config.module.style.font.size.popup}";
height = 120;
icons = 0;
margin = 32;
2024-11-11 13:10:39 +03:00
max-history = max;
max-visible = max;
on-notify = "exec ${pkgs.pipewire}/bin/pw-cat -p ${<static/Notification.ogg>}";
text-color = "#${config.module.style.color.bg.dark}";
2024-11-04 04:37:29 +03:00
width = 480;
};
sections = {
"mode=dnd" = {
invisible = 1;
2024-11-11 12:01:44 +03:00
on-notify = "exec ${pkgs.coreutils}/bin/true";
2024-11-04 04:37:29 +03:00
};
};
};
2024-04-06 03:03:58 +03:00
}