swaync: added restart triggers

This commit is contained in:
Tigor Hutasuhut 2024-10-20 17:44:06 +07:00
parent d49478741f
commit 0bfb7539db

View file

@ -27,6 +27,25 @@ in
};
};
systemd.user.services.swaync = {
Unit = {
X-Reload-Triggers = [
(pkgs.writeText "swaync/config.json" (builtins.toJSON config.services.swaync.settings))
config.services.swaync.style
];
};
Service =
let
reloadScript = pkgs.writeShellScriptBin "swaync-reload.sh" /*sh*/ ''
${pkgs.swaynotificationcenter}/bin/swaync-client --reload-config
${pkgs.swaynotificationcenter}/bin/swaync-client --reload-css
'';
in
{
ExecReload = "${lib.meta.getExe reloadScript}";
};
};
home.packages = with pkgs; [
libnotify
];