From 6a82b443eb18be4176e16de0ee65c35054a9bb83 Mon Sep 17 00:00:00 2001 From: arminius-smh Date: Fri, 2 Aug 2024 10:15:18 +0200 Subject: [PATCH] home-cursor: add hyprcursor support add the option to enable hyprcursor support by setting the relevant environment variables --- modules/config/home-cursor.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/config/home-cursor.nix b/modules/config/home-cursor.nix index cb9a2ab2..44a547d4 100644 --- a/modules/config/home-cursor.nix +++ b/modules/config/home-cursor.nix @@ -45,6 +45,19 @@ let gtk config generation for {option}`home.pointerCursor` ''; }; + + hyprcursor = { + enable = mkEnableOption '' + hyprcursor config generation + ''; + + size = mkOption { + type = types.nullOr types.int; + example = 32; + default = null; + description = "The cursor size for hyprcursor."; + }; + }; }; }; @@ -178,5 +191,13 @@ in { (mkIf cfg.gtk.enable { gtk.cursorTheme = mkDefault { inherit (cfg) package name size; }; }) + + (mkIf cfg.hyprcursor.enable { + home.sessionVariables = { + HYPRCURSOR_THEME = cfg.name; + HYPRCURSOR_SIZE = + if isNull cfg.hyprcursor.size then cfg.size else cfg.hyprcursor.name; + }; + }) ]); }