From a9c41069a62d82966ad7a709fbeec331f7af6f79 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Wed, 22 Jan 2025 14:37:09 -0500 Subject: [PATCH] fix(hypr): load plugins in exec-once --- modules/desktop/environment/home/hyprexpo.nix | 7 +++++-- modules/desktop/environment/home/hyprgrass.nix | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/desktop/environment/home/hyprexpo.nix b/modules/desktop/environment/home/hyprexpo.nix index 85c14938..0015abeb 100644 --- a/modules/desktop/environment/home/hyprexpo.nix +++ b/modules/desktop/environment/home/hyprexpo.nix @@ -6,15 +6,18 @@ self: { }: let inherit (self.lib.hypr) mkBind; - inherit (lib) mkIf; + inherit (lib) mkBefore mkIf; cfg = osConfig.roles.desktop; in { config = mkIf cfg.enable { wayland.windowManager.hyprland = { - plugins = [self.inputs.hyprland-plugins.packages.${pkgs.system}.hyprexpo]; + # FIXME: https://github.com/hyprwm/Hyprland/issues/9131 + # plugins = [self.inputs.hyprland-plugins.packages.${pkgs.system}.hyprexpo]; settings = { + exec-once = mkBefore ["hyprctl plugins load ${self.inputs.hyprland-plugins.packages.${pkgs.system}.hyprexpo}/lib/libhyprexpo.so"]; + plugin.hyprexpo = { columns = 3; gap_size = 5; diff --git a/modules/desktop/environment/home/hyprgrass.nix b/modules/desktop/environment/home/hyprgrass.nix index e9d4b3dc..60a415a4 100644 --- a/modules/desktop/environment/home/hyprgrass.nix +++ b/modules/desktop/environment/home/hyprgrass.nix @@ -6,15 +6,18 @@ self: { }: let inherit (self.lib.hypr) mkBind; - inherit (lib) map mkIf; + inherit (lib) map mkBefore mkIf; cfg = osConfig.roles.desktop; in { config = mkIf (cfg.enable && cfg.isTouchscreen) { wayland.windowManager.hyprland = { - plugins = [self.inputs.hyprgrass.packages.${pkgs.system}.default]; + # FIXME: https://github.com/hyprwm/Hyprland/issues/9131 + # plugins = [self.inputs.hyprgrass.packages.${pkgs.system}.default]; settings = { + exec-once = mkBefore ["hyprctl plugins load ${self.inputs.hyprgrass.packages.${pkgs.system}.default}/lib/libhyprgrass.so"]; + plugin.touch_gestures = { # The default sensitivity is probably too low on tablet screens, # I recommend turning it up to 4.0