-
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]: #486 Closes: #486 Reviewed-by: NAHO <[email protected]>
- Loading branch information
Showing
1 changed file
with
23 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,29 @@ | ||
{ config, lib, ... }: | ||
|
||
{ | ||
options.stylix.targets.zellij.enable = | ||
config.lib.stylix.mkEnableTarget "zellij" true; | ||
options.stylix.targets.zellij.enable = config.lib.stylix.mkEnableTarget "zellij" true; | ||
|
||
config = lib.mkIf (config.stylix.enable && config.stylix.targets.zellij.enable) { | ||
programs.zellij.settings = { | ||
theme = "stylix"; | ||
themes.stylix = with config.lib.stylix.colors.withHashtag; { | ||
bg = base03; | ||
fg = base05; | ||
red = base08; | ||
green = base0B; | ||
blue = base0D; | ||
yellow = base0A; | ||
magenta = base0E; | ||
orange = base09; | ||
cyan = base0C; | ||
black = base00; | ||
white = base07; | ||
}; | ||
}; | ||
}; | ||
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}"; | ||
} | ||
} | ||
''; | ||
}; | ||
|
||
} |