added alacritty configs

This commit is contained in:
Folke Lemaitre
2021-04-20 14:47:35 +02:00
parent 86a83bc11f
commit 3ac5e92e37
5 changed files with 128 additions and 4 deletions

View File

@@ -17,8 +17,7 @@ A dark Neovim theme written in Lua ported from the Visual Studio Code [TokyoNigh
+ minimal inactive statusline + minimal inactive statusline
+ vim terminal colors + vim terminal colors
+ darker background for sidebar-like windows + darker background for sidebar-like windows
+ color configs for [Kitty](https://sw.kovidgoyal.net/kitty/conf.html?highlight=include) + color configs for [Kitty](https://sw.kovidgoyal.net/kitty/conf.html?highlight=include), [Alacritty](https://github.com/alacritty/alacritty) and [Fish Shell](https://fishshell.com/)
+ color configs for [Fish Shell](https://fishshell.com/)
+ **lualine** theme + **lualine** theme
### Plugin Support ### Plugin Support
@@ -107,7 +106,6 @@ let g:tokyonight_sidebars = [ "quickfix", "__vista__", "terminal" ]
## 🍭 Extras ## 🍭 Extras
Two color configs for **Kitty** and **Fish** can be found in [extras](extras/). To use them, refer to their respective documentation. Extra color configs for **Kitty**, **Alacritty** and **Fish** can be found in [extras](extras/). To use them, refer to their respective documentation.
![image](https://user-images.githubusercontent.com/292349/115395546-d8d6f880-a198-11eb-98fb-a1194787701d.png) ![image](https://user-images.githubusercontent.com/292349/115395546-d8d6f880-a198-11eb-98fb-a1194787701d.png)

View File

@@ -0,0 +1,34 @@
# TokyoNight Alacritty Colors
colors:
# Default colors
primary:
background: '0x1a1b26'
foreground: '0xc0caf5'
# Normal colors
normal:
black: '0x15161E'
red: '0xf7768e'
green: '0x9ece6a'
yellow: '0xe0af68'
blue: '0x7aa2f7'
magenta: '0xbb9af7'
cyan: '0x7dcfff'
white: '0xa9b1d6'
# Bright colors
bright:
black: '0x15161E'
red: '0xf7768e'
green: '0x9ece6a'
yellow: '0xe0af68'
blue: '0x7aa2f7'
magenta: '0xbb9af7'
cyan: '0x7dcfff'
white: '0xc0caf5'
indexed_colors:
- { index: 16, color: '0xff9e64' }
- { index: 17, color: '0xdb4b4b' }

View File

@@ -0,0 +1,34 @@
# TokyoNight Alacritty Colors
colors:
# Default colors
primary:
background: '0x24283b'
foreground: '0xc0caf5'
# Normal colors
normal:
black: '0x1D202F'
red: '0xf7768e'
green: '0x9ece6a'
yellow: '0xe0af68'
blue: '0x7aa2f7'
magenta: '0xbb9af7'
cyan: '0x7dcfff'
white: '0xa9b1d6'
# Bright colors
bright:
black: '0x1D202F'
red: '0xf7768e'
green: '0x9ece6a'
yellow: '0xe0af68'
blue: '0x7aa2f7'
magenta: '0xbb9af7'
cyan: '0x7dcfff'
white: '0xc0caf5'
indexed_colors:
- { index: 16, color: '0xff9e64' }
- { index: 17, color: '0xdb4b4b' }

View File

@@ -0,0 +1,54 @@
local util = require("tokyonight.util")
local M = {}
function M.alacritty(config)
config = config or require("tokyonight.config")
local colors = require("tokyonight.colors").setup(config)
local alacrittyColors = {}
for k, v in pairs(colors) do
if type(v) == "string" then alacrittyColors[k] = v:gsub("^#", "0x") end
end
local alacritty = util.template([[
# TokyoNight Alacritty Colors
colors:
# Default colors
primary:
background: '${bg}'
foreground: '${fg}'
# Normal colors
normal:
black: '${black}'
red: '${red}'
green: '${green}'
yellow: '${yellow}'
blue: '${blue}'
magenta: '${magenta}'
cyan: '${cyan}'
white: '${fg_dark}'
# Bright colors
bright:
black: '${black}'
red: '${red}'
green: '${green}'
yellow: '${yellow}'
blue: '${blue}'
magenta: '${magenta}'
cyan: '${cyan}'
white: '${fg}'
indexed_colors:
- { index: 16, color: '${orange}' }
- { index: 17, color: '${red1}' }
]], alacrittyColors)
return alacritty
end
return M

View File

@@ -3,6 +3,7 @@ package.path = "./lua/?/init.lua;./lua/?.lua"
local config = require("tokyonight.config") local config = require("tokyonight.config")
local kitty = require("tokyonight.extra.kitty") local kitty = require("tokyonight.extra.kitty")
local fish = require("tokyonight.extra.fish") local fish = require("tokyonight.extra.fish")
local alacritty = require("tokyonight.extra.alacritty")
local function write(str, fileName) local function write(str, fileName)
print("[write] extra/" .. fileName) print("[write] extra/" .. fileName)
@@ -15,8 +16,11 @@ config.style = "storm"
write(kitty.kitty(config), "kitty_tokyonight_storm.conf") write(kitty.kitty(config), "kitty_tokyonight_storm.conf")
write(fish.fish(config), "fish_tokyonight_storm.fish") write(fish.fish(config), "fish_tokyonight_storm.fish")
write(alacritty.alacritty(config), "alacritty_tokyonight_storm.yml")
config.style = "night" config.style = "night"
write(kitty.kitty(config), "kitty_tokyonight_night.conf") write(kitty.kitty(config), "kitty_tokyonight_night.conf")
write(fish.fish(config), "fish_tokyonight_night.fish") write(fish.fish(config), "fish_tokyonight_night.fish")
write(alacritty.alacritty(config), "alacritty_tokyonight_night.yml")