feat(home-manager): source hyprland theme and add accent colors (#80)
* feat(home-manager/hyprland): source theme + accent Since Home Manager defbb9c, Hyprland on Home Manager now sources files before most other configuration, meaning Catppuccin Nix can now source a theme colors file instead of inserting them into the main configuration. In addition, `accent` and `accentAlpha` color variables have been added in a second sourced file. * chore(home-manager): format hyprland.nix --------- Co-authored-by: Liassica <git-commit.jingle869@aleeas.com> Co-authored-by: seth <getchoo@tuta.io>
This commit is contained in:
parent
b0dc7f3181
commit
cab752b0f0
1 changed files with 12 additions and 7 deletions
|
@ -8,12 +8,17 @@ let
|
||||||
enable = cfg.enable && config.wayland.windowManager.hyprland.enable;
|
enable = cfg.enable && config.wayland.windowManager.hyprland.enable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.wayland.windowManager.hyprland.catppuccin =
|
options.wayland.windowManager.hyprland.catppuccin = lib.ctp.mkCatppuccinOpt "hyprland" // {
|
||||||
lib.ctp.mkCatppuccinOpt "hyprland";
|
accent = lib.ctp.mkAccentOpt "hyprland";
|
||||||
|
};
|
||||||
|
|
||||||
# Because of how nix merges options and hyprland interprets options, sourcing
|
config.wayland.windowManager.hyprland.settings = lib.mkIf enable {
|
||||||
# the file does not work. instead, parse the theme and put it in settings so
|
source = [
|
||||||
# the variables appear early enough in the file to be applied properly.
|
"${sources.hyprland}/themes/${cfg.flavour}.conf"
|
||||||
config.wayland.windowManager.hyprland.settings = lib.mkIf enable
|
(builtins.toFile "hyprland-${cfg.accent}-accent.conf" ''
|
||||||
(lib.ctp.fromINI (sources.hyprland + /themes/${cfg.flavour}.conf));
|
$accent=''$${cfg.accent}
|
||||||
|
$accentAlpha=''$${cfg.accent}Alpha
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue