hyprland: do not override existing plugins settings in config

The plugin setting in the Hyprland config is used both for defining
plugin paths and configuring the plugins. This fix removes the
silent override of the plugins settings converting them to the
`plugin:<name> { ...settings }` syntax.
This commit is contained in:
Samuele Facenda 2024-01-19 11:27:00 +01:00 committed by GitHub
parent d6185e83d8
commit 2064348e55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 1 deletions

View file

@ -207,7 +207,8 @@ in {
else else
entry; entry;
in map mkEntry cfg.plugins; in map mkEntry cfg.plugins;
}; } // lib.mapAttrs' (n: v: lib.nameValuePair "plugin:${n}" v)
(lib.attrByPath [ "plugin" ] { } cfg.settings);
shouldGenerate = cfg.systemd.enable || cfg.extraConfig != "" shouldGenerate = cfg.systemd.enable || cfg.extraConfig != ""
|| combinedSettings != { }; || combinedSettings != { };

View file

@ -26,6 +26,13 @@ input {
follow_mouse=1 follow_mouse=1
kb_layout=ro kb_layout=ro
} }
plugin:plugin1 {
section {
other=dummy setting
}
dummy=plugin setting
}
bindm=$mod, mouse:272, movewindow bindm=$mod, mouse:272, movewindow
bindm=$mod, mouse:273, resizewindow bindm=$mod, mouse:273, resizewindow
bindm=$mod ALT, mouse:272, resizewindow bindm=$mod ALT, mouse:272, resizewindow

View file

@ -45,6 +45,13 @@
"$mod, mouse:273, resizewindow" "$mod, mouse:273, resizewindow"
"$mod ALT, mouse:272, resizewindow" "$mod ALT, mouse:272, resizewindow"
]; ];
plugin = {
plugin1 = {
dummy = "plugin setting";
section = { other = "dummy setting"; };
};
};
}; };
extraConfig = '' extraConfig = ''
# window resize # window resize