diff options
author | Robert Helgesson <robert@rycee.net> | 2019-01-13 23:48:20 +0100 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2019-01-13 23:48:20 +0100 |
commit | faee57185015dca770ebdab320dbdcf624e6c565 (patch) | |
tree | 8c52024011f7fd841881c9e914d8746b578a0afe /modules/services/dunst.nix | |
parent | 6f422785c3402102f444092c1d871b87a1311a80 (diff) |
dunst: kill daemon on configuration change
Since Dunst is DBus activated it is OK to simply kill it since DBus
will restart it when necessary.
Diffstat (limited to 'modules/services/dunst.nix')
-rw-r--r-- | modules/services/dunst.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/services/dunst.nix b/modules/services/dunst.nix index 0e82d43b61e..0a5daf3810b 100644 --- a/modules/services/dunst.nix +++ b/modules/services/dunst.nix @@ -155,7 +155,17 @@ in } (mkIf (cfg.settings != {}) { - xdg.configFile."dunst/dunstrc".text = toDunstIni cfg.settings; + xdg.configFile."dunst/dunstrc" = { + text = toDunstIni cfg.settings; + onChange = '' + pkillVerbose="" + if [[ -v VERBOSE ]]; then + pkillVerbose="-e" + fi + $DRY_RUN_CMD ${pkgs.procps}/bin/pkill -u $USER $pkillVerbose dunst + unset pkillVerbose + ''; + }; }) ] ); |