home-cursor: add hyprcursor support

add the option to enable hyprcursor support by setting the relevant
environment variables
This commit is contained in:
arminius-smh 2024-08-02 10:15:18 +02:00
parent 6e090576c4
commit 6a82b443eb
No known key found for this signature in database

View file

@ -45,6 +45,19 @@ let
gtk config generation for {option}`home.pointerCursor` 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 { (mkIf cfg.gtk.enable {
gtk.cursorTheme = mkDefault { inherit (cfg) package name size; }; 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;
};
})
]); ]);
} }