2024-08-02 17:58:08 -04:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
2024-08-07 23:09:31 -04:00
|
|
|
}: let
|
|
|
|
cfg = config.ar.home;
|
|
|
|
in {
|
|
|
|
config = lib.mkIf cfg.services.mako.enable {
|
2024-08-02 17:58:08 -04:00
|
|
|
services.mako = {
|
2024-08-03 17:28:17 -04:00
|
|
|
actions = true;
|
2024-08-10 18:11:11 -04:00
|
|
|
anchor = "bottom-right";
|
2024-08-08 20:47:25 -04:00
|
|
|
backgroundColor = "${cfg.theme.colors.background}99";
|
|
|
|
borderColor = "${cfg.theme.colors.primary}CC";
|
2024-08-09 18:16:46 -04:00
|
|
|
borderRadius = cfg.theme.borderRadius;
|
|
|
|
borderSize = 4;
|
2024-08-02 17:58:08 -04:00
|
|
|
defaultTimeout = 10000;
|
2024-08-03 17:28:17 -04:00
|
|
|
enable = true;
|
2024-08-10 18:11:11 -04:00
|
|
|
font = "${cfg.theme.sansFont.name} ${toString cfg.theme.sansFont.size}";
|
|
|
|
groupBy = "app-name";
|
2024-08-02 17:58:08 -04:00
|
|
|
height = 300;
|
2024-08-03 17:28:17 -04:00
|
|
|
iconPath = "${pkgs.papirus-icon-theme}/share/icons/Papirus/";
|
|
|
|
icons = true;
|
2024-08-02 17:58:08 -04:00
|
|
|
layer = "top";
|
2024-08-03 17:28:17 -04:00
|
|
|
margin = "20,0";
|
2024-08-02 17:58:08 -04:00
|
|
|
padding = "15";
|
2024-08-09 20:56:21 -04:00
|
|
|
progressColor = "source ${cfg.theme.colors.secondary}";
|
2024-08-10 18:11:11 -04:00
|
|
|
sort = "+time";
|
2024-08-07 23:09:31 -04:00
|
|
|
textColor = "${cfg.theme.colors.text}";
|
2024-08-02 17:58:08 -04:00
|
|
|
width = 400;
|
2024-08-03 17:28:17 -04:00
|
|
|
|
2024-08-02 17:58:08 -04:00
|
|
|
extraConfig = ''
|
2024-08-03 17:28:17 -04:00
|
|
|
on-notify=exec ${lib.getExe pkgs.mpv} ${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/message.oga
|
2024-08-10 18:11:11 -04:00
|
|
|
outer-margin=20
|
2024-08-03 17:28:17 -04:00
|
|
|
|
2024-08-02 17:58:08 -04:00
|
|
|
[mode=do-not-disturb]
|
|
|
|
invisible=1
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.user.services.mako = {
|
|
|
|
Unit = {
|
|
|
|
After = "graphical-session.target";
|
2024-08-12 10:17:21 -04:00
|
|
|
BindsTo = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target" ++ lib.optional (cfg.desktop.sway.enable) "sway-session.target";
|
2024-08-02 17:58:08 -04:00
|
|
|
Description = "Lightweight Wayland notification daemon";
|
|
|
|
Documentation = "man:mako(1)";
|
|
|
|
PartOf = "graphical-session.target";
|
|
|
|
};
|
|
|
|
|
|
|
|
Service = {
|
|
|
|
BusName = "org.freedesktop.Notifications";
|
|
|
|
ExecReload = ''${lib.getExe' pkgs.mako "makoctl"} reload'';
|
|
|
|
ExecStart = "${lib.getExe pkgs.mako}";
|
2024-08-11 23:43:48 -04:00
|
|
|
Restart = lib.mkForce "no";
|
2024-08-02 17:58:08 -04:00
|
|
|
Type = "dbus";
|
|
|
|
};
|
|
|
|
|
2024-08-12 10:17:21 -04:00
|
|
|
Install.WantedBy = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target" ++ lib.optional (cfg.desktop.sway.enable) "sway-session.target";
|
2024-08-02 17:58:08 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|