1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-06 17:11:03 +01:00

swaync: Add onChange (#6233)

Call swanyc-client with the argument reload-css/reload-config when config/CSS is changed.
This commit is contained in:
LemmusLemmus 2025-04-04 18:11:48 +02:00 committed by GitHub
parent a802defb16
commit bb036cb353
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -83,13 +83,16 @@ in {
lib.mkIf (cfg.package != null) [ cfg.package pkgs.at-spi2-core ]; lib.mkIf (cfg.package != null) [ cfg.package pkgs.at-spi2-core ];
xdg.configFile = { xdg.configFile = {
"swaync/config.json".source = "swaync/config.json" = {
jsonFormat.generate "config.json" cfg.settings; source = jsonFormat.generate "config.json" cfg.settings;
onChange = "${cfg.package}/bin/swaync-client --reload-config";
};
"swaync/style.css" = lib.mkIf (cfg.style != null) { "swaync/style.css" = lib.mkIf (cfg.style != null) {
source = if builtins.isPath cfg.style || lib.isStorePath cfg.style then source = if builtins.isPath cfg.style || lib.isStorePath cfg.style then
cfg.style cfg.style
else else
pkgs.writeText "swaync/style.css" cfg.style; pkgs.writeText "swaync/style.css" cfg.style;
onChange = "${cfg.package}/bin/swaync-client --reload-css";
}; };
}; };