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-24 20:13:58 -07:00
|
|
|
inherit (config.catppuccin) pointerCursor;
|
2023-11-03 08:55:17 -07:00
|
|
|
in
|
|
|
|
{
|
2024-06-28 09:29:30 -07:00
|
|
|
options.wayland.windowManager.hyprland.catppuccin =
|
|
|
|
lib.ctp.mkCatppuccinOpt { name = "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 {
|
2024-06-24 20:13:58 -07:00
|
|
|
home.sessionVariables = lib.mkIf pointerCursor.enable {
|
2024-06-10 15:28:46 -07:00
|
|
|
HYPRCURSOR_SIZE = "24";
|
2024-06-24 20:13:58 -07:00
|
|
|
HYPRCURSOR_THEME = "catppuccin-${pointerCursor.flavor}-${pointerCursor.accent}-cursors";
|
2024-06-10 15:28:46 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
'')
|
|
|
|
]
|
2024-06-24 20:13:58 -07:00
|
|
|
++ lib.optionals pointerCursor.enable [
|
2024-06-10 15:28:46 -07:00
|
|
|
(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
|
|
|
}
|