11.stylix/modules/zellij/hm.nix
Kamron Bhavnagri e0a278871b
zellij: write theme file instead of writing theme into config (#616)
Write theme file instead of writing theme into config.

Also, fix contrast issues [1] by changing the red color to base01.

[1]: https://github.com/danth/stylix/issues/486

Closes: https://github.com/danth/stylix/issues/486

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2024-11-14 10:48:15 +01:00

29 lines
799 B
Nix

{ config, lib, ... }:
{
options.stylix.targets.zellij.enable = config.lib.stylix.mkEnableTarget "zellij" true;
config =
lib.mkIf
(config.stylix.enable && config.stylix.targets.zellij.enable && config.programs.zellij.enable)
{
xdg.configFile."zellij/themes/stylix.kdl".text = with config.lib.stylix.colors.withHashtag; ''
themes {
default {
bg "${base03}";
fg "${base05}";
red "${base01}";
green "${base0B}";
blue "${base0D}";
yellow "${base0A}";
magenta "${base0E}";
orange "${base09}";
cyan "${base0C}";
black "${base00}";
white "${base07}";
}
}
'';
};
}