1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +00:00

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 committed by Robert Helgesson
parent 8cf9cb2ee7
commit 445d721ecf
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED

View file

@ -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;
};
})
]);
}