2024-05-21 14:53:46 -07:00
|
|
|
{ config, lib, ... }:
|
2023-11-03 08:55:17 -07:00
|
|
|
let
|
2024-05-13 13:33:16 -07:00
|
|
|
inherit (config.catppuccin) sources;
|
2023-11-03 08:55:17 -07:00
|
|
|
cfg = config.wayland.windowManager.hyprland.catppuccin;
|
|
|
|
enable = cfg.enable && config.wayland.windowManager.hyprland.enable;
|
2024-06-10 15:28:46 -07:00
|
|
|
inherit (config.gtk.catppuccin) cursor;
|
2023-11-03 08:55:17 -07:00
|
|
|
in
|
|
|
|
{
|
2024-05-07 17:36:12 -07:00
|
|
|
options.wayland.windowManager.hyprland.catppuccin = lib.ctp.mkCatppuccinOpt "hyprland" // {
|
|
|
|
accent = lib.ctp.mkAccentOpt "hyprland";
|
|
|
|
};
|
2023-11-03 08:55:17 -07:00
|
|
|
|
2024-06-10 15:28:46 -07:00
|
|
|
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
|
|
|
|
'')
|
|
|
|
];
|
|
|
|
};
|
2024-05-07 17:36:12 -07:00
|
|
|
};
|
2023-11-03 08:55:17 -07:00
|
|
|
}
|