From 445d721ecfbd92d83f857f12f1f99f5c8fa79951 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 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/config/home-cursor.nix b/modules/config/home-cursor.nix index cb9a2ab2..0a8fb378 100644 --- a/modules/config/home-cursor.nix +++ b/modules/config/home-cursor.nix @@ -45,6 +45,17 @@ 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 +189,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 cfg.hyprcursor.size != null then cfg.hyprcursor.size else cfg.size; + }; + }) ]); }