nix/home/file/mako/default.nix

36 lines
987 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
...
} @args: let
swayscript = pkgs.callPackage <package/swayscript> args;
2024-11-04 04:37:29 +03:00
alpha = config.module.style.opacity.hex;
color = config.module.style.color;
2024-12-14 22:05:09 +03:00
max = 2;
2024-11-04 04:37:29 +03:00
in {
file = (pkgs.formats.iniWithGlobalSection { }).generate "MakoConfig" {
globalSection = {
anchor = "top-center";
2024-11-23 08:15:47 +03:00
background-color = "#${color.highlight}${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 ${swayscript}/bin/swayscript notify";
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
}