diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index da82d9e..69e1de2 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -1,9 +1,8 @@ { config, lib, ... }: let - inherit (config.catppuccin) sources; + inherit (config.catppuccin) sources pointerCursor; cfg = config.wayland.windowManager.hyprland.catppuccin; enable = cfg.enable && config.wayland.windowManager.hyprland.enable; - inherit (config.catppuccin) pointerCursor; in { options.wayland.windowManager.hyprland.catppuccin = @@ -14,25 +13,14 @@ in config = lib.mkIf enable { home.sessionVariables = lib.mkIf pointerCursor.enable { - HYPRCURSOR_SIZE = "24"; + HYPRCURSOR_SIZE = config.home.pointerCursor.size; HYPRCURSOR_THEME = "catppuccin-${pointerCursor.flavor}-${pointerCursor.accent}-cursors"; }; wayland.windowManager.hyprland.settings = { - source = - [ - "${sources.hyprland}/themes/${cfg.flavor}.conf" - (builtins.toFile "hyprland-${cfg.accent}-accent.conf" '' - $accent=''$${cfg.accent} - $accentAlpha=''$${cfg.accent}Alpha - '') - ] - ++ lib.optionals pointerCursor.enable [ - (builtins.toFile "hyprland-cursors.conf" '' - env = HYPRCURSOR_THEME,MyCursor - env = HYPRCURSOR_SIZE,24 - '') - ]; + source = "${sources.hyprland}/themes/${cfg.flavor}.conf"; + "$accent" = "\$${cfg.accent}"; + "$accentAlpha" = "\$${cfg.accent}Alpha"; }; }; }