Skip to content

Commit 3071801

Browse files
committed
chore(colorscheme): Add accentColor
1 parent 9901b61 commit 3071801

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

config/theme.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@
66
...
77
}: let
88
conf_scheme = config'.colorscheme;
9-
parsed =
9+
parsedBase =
1010
if builtins.isAttrs conf_scheme
1111
then conf_scheme
1212
else "${pkgs.base16-schemes}/share/themes/${conf_scheme}.yaml";
13+
accentColor =
14+
if config'.accentColor != null
15+
then config'.accentColor
16+
else parsedBase.base0D;
17+
parsed = parsedBase // {base0D = accentColor;};
1318
base16Lib = pkgs.callPackage base16.lib {};
1419
scheme = base16Lib.mkSchemeAttrs parsed;
1520
in {

modules/default.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@
5252
or a path to a custom yaml file.
5353
'';
5454
};
55+
accentColor = lib.mkOption {
56+
default = null;
57+
example = "F7768E";
58+
type = with lib.types; nullOr str;
59+
description = ''
60+
Overrides base0D as it is most widely used as primary color.
61+
'';
62+
};
5563

5664
enableNvfDefaultKeybinds = lib.mkOption {
5765
default = false;

0 commit comments

Comments
 (0)