Migrate to tokyo night theme in some places

work
mat ess 2022-02-11 00:11:36 -05:00
parent 0f8e6487d2
commit 9b3c7ae2dc
2 changed files with 95 additions and 42 deletions

View File

@ -18,6 +18,41 @@ let
tab_bar_background = "#${basehl}"; tab_bar_background = "#${basehl}";
inactive_tab_background = "#${strong}"; inactive_tab_background = "#${strong}";
}; };
commonColors = colors: with colors; {
# ref for tokyo-night colors
# https://github.com/davidmathers/tokyo-night-kitty-theme/blob/trunk/tokyo-night-kitty.conf
# black
color0 = "#${darkBasehl}";
color8 = "#${darkBase}";
# red
color1 = "#${red}";
color9 = "#${orange}";
# green
color2 = "#${green}";
color10 = "#${darkestTone}";
# yellow
color3 = "#${yellow}";
color11 = "#${darkTone}";
# blue
color4 = "#${blue}";
color12 = "#${lightTone}";
# magenta
color5 = "#${magenta}";
color13 = "#${violet}";
# cyan
color6 = "#${cyan}";
color14 = "#${lightestTone}";
# white
color7 = "#${lightBasehl}";
color15 = "#${lightBase}";
# url underline color to fit colors
url_color = "#${blue}";
# tab bar
active_tab_foreground = "#${lightBase}";
active_tab_background = "#${green}";
inactive_tab_foreground = "#${lightBase}";
};
in in
# }}} # }}}
{ {
@ -62,48 +97,20 @@ in
# }}} # }}}
# Colors config ------------------------------------------------------------------------------ {{{ # Colors config ------------------------------------------------------------------------------ {{{
programs.kitty.extras.colors = with pkgs.lib.colors; { programs.kitty.extras.colors =
enable = true; let
theme = pkgs.lib.colors.tokyo-night; in
# Colors that aren't dependent on background {
common = with pkgs.lib.colors.solarized.colors; { enable = true;
# black # Colors that aren't dependent on background
color0 = "#${darkBasehl}"; common =
color8 = "#${darkBase}"; # tokyo night doesn't really have a specific violet
# red commonColors (theme.colors // { violet = theme.colors.magenta; });
color1 = "#${red}"; # Background dependent colors
color9 = "#${orange}"; dark = backgroundDependantColors theme.dark;
# green light = backgroundDependantColors theme.light;
color2 = "#${green}";
color10 = "#${darkestTone}";
# yellow
color3 = "#${yellow}";
color11 = "#${darkTone}";
# blue
color4 = "#${blue}";
color12 = "#${lightTone}";
# magenta
color5 = "#${magenta}";
color13 = "#${violet}";
# cyan
color6 = "#${cyan}";
color14 = "#${lightestTone}";
# white
color7 = "#${lightBasehl}";
color15 = "#${lightBase}";
# url underline color to fit colors
url_color = "#${blue}";
# tab bar
active_tab_foreground = "#${lightBase}";
active_tab_background = "#${green}";
inactive_tab_foreground = "#${lightBase}";
}; };
# Background dependent colors
dark = backgroundDependantColors solarized.dark;
light = backgroundDependantColors solarized.light;
};
programs.fish.functions.set-term-colors = { programs.fish.functions.set-term-colors = {
body = "term-background $term_background"; body = "term-background $term_background";
onVariable = "term_background"; onVariable = "term_background";

View File

@ -1,7 +1,7 @@
# TODO: change color scheme
# Colors from: https://ethanschoonover.com/solarized
# Used in Kitty terminal config: `./kitty-configs.nix` # Used in Kitty terminal config: `./kitty-configs.nix`
# Colors from: https://ethanschoonover.com/solarized
# SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB # SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB
# --------- ------- ---- ------- ----------- ---------- ----------- ----------- # --------- ------- ---- ------- ----------- ---------- ----------- -----------
# base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21 # base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21
@ -68,6 +68,52 @@ final: prev: {
inherit (colors) yellow orange red megenta violet blue cyan green; inherit (colors) yellow orange red megenta violet blue cyan green;
}; };
}; };
tokyo-night = rec {
colors = {
darkBase = "1a1b26"; # editor background
darkBasehl = "414868"; # terminal black
# darkBasehl = "0f0f14"; # light terminal black
darkestTone = "565f89"; # comments
darkTone = "9aa5ce"; # markdown, html
lightTone = "a9b1d6"; # editor foreground
lightestTone = "c0caf5"; # variables, class names, terminal white
lightBasehl = "9699a3"; # light comments
lightBase = "d5d6db"; # light editor background
yellow = "e0af68";
orange = "ff9e64";
red = "f7768e";
magenta = "bb9af7";
# violet = "6c71c4";
blue = "7aa2f7";
cyan = "7dcfff";
green = "73daca";
};
light = with colors; {
base = lightBase;
basehl = lightBasehl;
invbase = darkBase;
invbasehl = darkBasehl;
main = darkTone;
faded = lightTone;
muted = lightestTone;
strong = darkestTone;
inherit (colors) yellow orange red megenta blue cyan green;
};
dark = with colors; {
base = darkBase;
basehl = darkBasehl;
invbase = lightBase;
invbasehl = lightBasehl;
main = lightTone;
faded = darkTone;
muted = darkestTone;
strong = lightestTone;
inherit (colors) yellow orange red megenta blue cyan green;
};
};
}; };
}; };
} }