512306ae58
* fix(home-manager): make hyprcursor inherit size * fix(home-manager): unset hyprcursor env vars in hyprland config They're already set in `home.sessionVariables`. Note that you need to launch hyprland from a login shell in order for the variables to be set, but I doubt that hyprcursor was being used prior to this commit since `MyCursor` is invalid * refactor(home-manager): set `accent(Alpha)` through hyprland nix config Why not use nix config when it exists
26 lines
840 B
Nix
26 lines
840 B
Nix
{ config, lib, ... }:
|
|
let
|
|
inherit (config.catppuccin) sources pointerCursor;
|
|
cfg = config.wayland.windowManager.hyprland.catppuccin;
|
|
enable = cfg.enable && config.wayland.windowManager.hyprland.enable;
|
|
in
|
|
{
|
|
options.wayland.windowManager.hyprland.catppuccin =
|
|
lib.ctp.mkCatppuccinOpt { name = "hyprland"; }
|
|
// {
|
|
accent = lib.ctp.mkAccentOpt "hyprland";
|
|
};
|
|
|
|
config = lib.mkIf enable {
|
|
home.sessionVariables = lib.mkIf pointerCursor.enable {
|
|
HYPRCURSOR_SIZE = config.home.pointerCursor.size;
|
|
HYPRCURSOR_THEME = "catppuccin-${pointerCursor.flavor}-${pointerCursor.accent}-cursors";
|
|
};
|
|
|
|
wayland.windowManager.hyprland.settings = {
|
|
source = "${sources.hyprland}/themes/${cfg.flavor}.conf";
|
|
"$accent" = "\$${cfg.accent}";
|
|
"$accentAlpha" = "\$${cfg.accent}Alpha";
|
|
};
|
|
};
|
|
}
|