Skip to content

Commit

Permalink
fix(home-manager/hyprland): import accents from file (#347)
Browse files Browse the repository at this point in the history
Ensure accents are defined before user vars
Partially reverts 512306a
  • Loading branch information
Weathercold authored Oct 8, 2024
1 parent bad96d3 commit 65f2a8a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
11 changes: 8 additions & 3 deletions modules/home-manager/hyprland.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ in
};

wayland.windowManager.hyprland.settings = {
source = [ "${sources.hyprland}/themes/${cfg.flavor}.conf" ];
"$accent" = "\$${cfg.accent}";
"$accentAlpha" = "\$${cfg.accent}Alpha";
source = [
"${sources.hyprland}/themes/${cfg.flavor}.conf"
# Define accents in file to ensure they appear before user vars
(builtins.toFile "hyprland-${cfg.accent}-accent.conf" ''
$accent = ''$${cfg.accent}
$accentAlpha = ''$${cfg.accent}Alpha
'')
];
};
};
}
11 changes: 8 additions & 3 deletions modules/home-manager/hyprlock.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ in

config = lib.mkIf enable {
programs.hyprlock.settings = {
source = [ "${sources.hyprland}/themes/${cfg.flavor}.conf" ];
"$accent" = "\$${cfg.accent}";
"$accentAlpha" = "\$${cfg.accent}Alpha";
source = [
"${sources.hyprland}/themes/${cfg.flavor}.conf"
# Define accents in file to ensure they appear before user vars
(builtins.toFile "hyprland-${cfg.accent}-accent.conf" ''
$accent = ''$${cfg.accent}
$accentAlpha = ''$${cfg.accent}Alpha
'')
];
};
};
}

0 comments on commit 65f2a8a

Please sign in to comment.