Add a notification daemon.

This commit is contained in:
Tom Alexander 2025-01-18 18:44:00 -05:00
parent 2c27d580f4
commit ed0d1e41d6
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 33 additions and 0 deletions

View File

@ -263,6 +263,7 @@ in
./lockscreen.nix
./screenshot.nix
./force_focus.nix
./notification.nix
];
options.me.swayIncludes = lib.mkOption {

View File

@ -0,0 +1,32 @@
{
config,
lib,
pkgs,
...
}:
let
notification_sway_config = pkgs.writeTextFile {
name = "notification.conf";
text =
builtins.replaceStrings
[ "@mako@" "@makoctl@" ]
[ "${pkgs.mako}/bin/mako" "${pkgs.mako}/bin/makoctl" ]
''
bindsym $mod+Escape exec @makoctl@ dismiss
bindsym $mod+Shift+Escape exec @makoctl@ invoke
# Notifications
exec @mako@
'';
};
in
{
imports = [ ];
config = lib.mkIf config.me.graphical {
me.swayIncludes = [
notification_sway_config
];
};
}