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:
parent
a802defb16
commit
bb036cb353
1 changed files with 5 additions and 2 deletions
|
|
@ -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";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue