feat(home-manager): set hyprcursor (#218)
This commit is contained in:
parent
85558d1638
commit
e55fb4262b
1 changed files with 23 additions and 8 deletions
|
@ -3,19 +3,34 @@ let
|
||||||
inherit (config.catppuccin) sources;
|
inherit (config.catppuccin) sources;
|
||||||
cfg = config.wayland.windowManager.hyprland.catppuccin;
|
cfg = config.wayland.windowManager.hyprland.catppuccin;
|
||||||
enable = cfg.enable && config.wayland.windowManager.hyprland.enable;
|
enable = cfg.enable && config.wayland.windowManager.hyprland.enable;
|
||||||
|
inherit (config.gtk.catppuccin) cursor;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.wayland.windowManager.hyprland.catppuccin = lib.ctp.mkCatppuccinOpt "hyprland" // {
|
options.wayland.windowManager.hyprland.catppuccin = lib.ctp.mkCatppuccinOpt "hyprland" // {
|
||||||
accent = lib.ctp.mkAccentOpt "hyprland";
|
accent = lib.ctp.mkAccentOpt "hyprland";
|
||||||
};
|
};
|
||||||
|
|
||||||
config.wayland.windowManager.hyprland.settings = lib.mkIf enable {
|
config = lib.mkIf enable {
|
||||||
source = [
|
home.sessionVariables = lib.mkIf cursor.enable {
|
||||||
"${sources.hyprland}/themes/${cfg.flavor}.conf"
|
HYPRCURSOR_SIZE = "24";
|
||||||
(builtins.toFile "hyprland-${cfg.accent}-accent.conf" ''
|
HYPRCURSOR_THEME = "catppuccin-${cursor.flavor}-${cursor.accent}-cursors";
|
||||||
$accent=''$${cfg.accent}
|
};
|
||||||
$accentAlpha=''$${cfg.accent}Alpha
|
|
||||||
'')
|
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
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue