From 0e2e443ff24f9d75925e91b89d1da44b863734af Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Tue, 21 Nov 2023 15:22:17 +0100 Subject: [PATCH] hyprland: mark plugin setting as important The plugins are often necessary for other configurations. --- modules/services/window-managers/hyprland.nix | 2 +- .../services/window-managers/hyprland/simple-config.conf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/services/window-managers/hyprland.nix b/modules/services/window-managers/hyprland.nix index ec7fc118d..9bf9cb294 100644 --- a/modules/services/window-managers/hyprland.nix +++ b/modules/services/window-managers/hyprland.nix @@ -229,7 +229,7 @@ in { }; allFields = filterAttrs (n: v: !(isAttrs v)) attrs; importantFields = filterAttrs (n: _: - (hasPrefix "$" n) || (hasPrefix "bezier" n) + (hasPrefix "$" n) || (hasPrefix "bezier" n) || (n == "plugin") || (cfg.sourceFirst && (hasPrefix "source" n))) allFields; fields = builtins.removeAttrs allFields (mapAttrsToList (n: _: n) importantFields); diff --git a/tests/modules/services/window-managers/hyprland/simple-config.conf b/tests/modules/services/window-managers/hyprland/simple-config.conf index 8d9619014..d715fad0b 100644 --- a/tests/modules/services/window-managers/hyprland/simple-config.conf +++ b/tests/modules/services/window-managers/hyprland/simple-config.conf @@ -3,6 +3,8 @@ $mod=SUPER bezier=smoothOut, 0.36, 0, 0.66, -0.56 bezier=smoothIn, 0.25, 1, 0.5, 1 bezier=overshot, 0.4,0.8,0.2,1.2 +plugin=/path/to/plugin1 +plugin=/nix/store/00000000000000000000000000000000-foo/lib/libfoo.so source=sourced.conf animations { animation=border, 1, 2, smoothIn @@ -27,8 +29,6 @@ input { bindm=$mod, mouse:272, movewindow bindm=$mod, mouse:273, resizewindow bindm=$mod ALT, mouse:272, resizewindow -plugin=/path/to/plugin1 -plugin=/nix/store/00000000000000000000000000000000-foo/lib/libfoo.so # window resize bind = $mod, S, submap, resize