diff --git a/home/modules/hyprland/swaync.nix b/home/modules/hyprland/swaync.nix index e118f2b..6abd638 100644 --- a/home/modules/hyprland/swaync.nix +++ b/home/modules/hyprland/swaync.nix @@ -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 ];