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}";
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
# }}}
{
@ -62,48 +97,20 @@ in
# }}}
# Colors config ------------------------------------------------------------------------------ {{{
programs.kitty.extras.colors = with pkgs.lib.colors; {
enable = true;
# Colors that aren't dependent on background
common = with pkgs.lib.colors.solarized.colors; {
# 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}";
programs.kitty.extras.colors =
let
theme = pkgs.lib.colors.tokyo-night; in
{
enable = true;
# Colors that aren't dependent on background
common =
# tokyo night doesn't really have a specific violet
commonColors (theme.colors // { violet = theme.colors.magenta; });
# Background dependent colors
dark = backgroundDependantColors theme.dark;
light = backgroundDependantColors theme.light;
};
# Background dependent colors
dark = backgroundDependantColors solarized.dark;
light = backgroundDependantColors solarized.light;
};
programs.fish.functions.set-term-colors = {
body = "term-background $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`
# Colors from: https://ethanschoonover.com/solarized
# 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
@ -68,6 +68,52 @@ final: prev: {
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;
};
};
};
};
}