2024-05-21 21:53:46 +00:00
|
|
|
{ config, lib, ... }:
|
2023-11-03 15:55:17 +00:00
|
|
|
let
|
2024-05-13 20:33:16 +00:00
|
|
|
inherit (config.catppuccin) sources;
|
2023-11-03 15:55:17 +00:00
|
|
|
cfg = config.wayland.windowManager.hyprland.catppuccin;
|
|
|
|
enable = cfg.enable && config.wayland.windowManager.hyprland.enable;
|
2024-06-25 03:13:58 +00:00
|
|
|
inherit (config.catppuccin) pointerCursor;
|
2023-11-03 15:55:17 +00:00
|
|
|
in
|
|
|
|
{
|
2024-06-28 16:29:30 +00:00
|
|
|
options.wayland.windowManager.hyprland.catppuccin =
|
|
|
|
lib.ctp.mkCatppuccinOpt { name = "hyprland"; }
|
|
|
|
// {
|
|
|
|
accent = lib.ctp.mkAccentOpt "hyprland";
|
|
|
|
};
|
2023-11-03 15:55:17 +00:00
|
|
|
|
2024-06-10 22:28:46 +00:00
|
|
|
config = lib.mkIf enable {
|
2024-06-25 03:13:58 +00:00
|
|
|
home.sessionVariables = lib.mkIf pointerCursor.enable {
|
2024-06-10 22:28:46 +00:00
|
|
|
HYPRCURSOR_SIZE = "24";
|
2024-06-25 03:13:58 +00:00
|
|
|
HYPRCURSOR_THEME = "catppuccin-${pointerCursor.flavor}-${pointerCursor.accent}-cursors";
|
2024-06-10 22:28:46 +00: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-25 03:13:58 +00:00
|
|
|
++ lib.optionals pointerCursor.enable [
|
2024-06-10 22:28:46 +00:00
|
|
|
(builtins.toFile "hyprland-cursors.conf" ''
|
|
|
|
env = HYPRCURSOR_THEME,MyCursor
|
|
|
|
env = HYPRCURSOR_SIZE,24
|
|
|
|
'')
|
|
|
|
];
|
|
|
|
};
|
2024-05-08 00:36:12 +00:00
|
|
|
};
|
2023-11-03 15:55:17 +00:00
|
|
|
}
|