feat(home-manager): set hyprcursor (#218)

This commit is contained in:
Isabel 2024-06-10 23:28:46 +01:00 committed by GitHub
parent 85558d1638
commit e55fb4262b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,19 +3,34 @@ let
inherit (config.catppuccin) sources;
cfg = config.wayland.windowManager.hyprland.catppuccin;
enable = cfg.enable && config.wayland.windowManager.hyprland.enable;
inherit (config.gtk.catppuccin) cursor;
in
{
options.wayland.windowManager.hyprland.catppuccin = lib.ctp.mkCatppuccinOpt "hyprland" // {
accent = lib.ctp.mkAccentOpt "hyprland";
};
config.wayland.windowManager.hyprland.settings = lib.mkIf enable {
source = [
config = lib.mkIf enable {
home.sessionVariables = lib.mkIf cursor.enable {
HYPRCURSOR_SIZE = "24";
HYPRCURSOR_THEME = "catppuccin-${cursor.flavor}-${cursor.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 cursor.enable [
(builtins.toFile "hyprland-cursors.conf" ''
env = HYPRCURSOR_THEME,MyCursor
env = HYPRCURSOR_SIZE,24
'')
];
};
};
}