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.

(cherry picked from commit faee571850)
This commit is contained in:
Robert Helgesson 2019-01-13 23:48:20 +01:00
parent f60f0c647f
commit 3c429c2462
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -155,7 +155,17 @@ in
} }
(mkIf (cfg.settings != {}) { (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
'';
};
}) })
] ]
); );