From bd1d74d87c74b24b5960bb350802bd67d0bbe1cf Mon Sep 17 00:00:00 2001 From: Dan Anglin Date: Sat, 26 Mar 2022 06:36:34 +0000 Subject: [PATCH] feat: add Tokyo Night theme References: https://github.com/folke/tokyonight.nvim/blob/main/extras/xresources_tokyonight_night.Xresources https://github.com/enkia/tokyo-night-vscode-theme/blob/master/README.md#color-palette --- config.h | 2 +- themes/tokyonight.h | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 themes/tokyonight.h diff --git a/config.h b/config.h index b4a569f..1724932 100644 --- a/config.h +++ b/config.h @@ -96,7 +96,7 @@ char *termname = "st-256color"; unsigned int tabspaces = 8; // theme -#include "themes/default.h" +#include "themes/tokyonight.h" /* * Default shape of cursor diff --git a/themes/tokyonight.h b/themes/tokyonight.h new file mode 100644 index 0000000..ba8abb4 --- /dev/null +++ b/themes/tokyonight.h @@ -0,0 +1,36 @@ +/* Terminal colors (16 first used in escape sequence) */ +static const char *colorname[] = { + /* 8 normal colors */ + [0] = "#15161e", /* black */ + [1] = "#f7768e", /* red */ + [2] = "#9ece6a", /* green */ + [3] = "#e0af68", /* yellow */ + [4] = "#7aa2f7", /* blue */ + [5] = "#bb9af7", /* magenta */ + [6] = "#7dcfff", /* cyan */ + [7] = "#a9b1d6", /* white */ + + /* 8 bright colors */ + [8] = "#414868", /* black */ + [9] = "#f7768e", /* red */ + [10] = "#9ece6a", /* green */ + [11] = "#e0af68", /* yellow */ + [12] = "#7aa2f7", /* blue */ + [13] = "#bb9af7", /* magenta */ + [14] = "#7dcfff", /* cyan */ + [15] = "#c0caf5", /* white */ + + /* special colours */ + [256] = "#c0caf5", /* foreground */ + [257] = "#1a1b26", /* background */ + [258] = "#555555", /* reverse cursor */ +}; + +/* + * Default colors (colorname index) + * foreground, background, cursor, reverse cursor + */ +unsigned int defaultfg = 256; /* foreground */ +unsigned int defaultbg = 257; /* background */ +unsigned int defaultcs = 256; /* cursor */ +static unsigned int defaultrcs = 258; /* reverse cursor */