added alacritty configs
This commit is contained in:
54
lua/tokyonight/extra/alacritty.lua
Normal file
54
lua/tokyonight/extra/alacritty.lua
Normal 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
|
||||
|
||||
@@ -3,6 +3,7 @@ package.path = "./lua/?/init.lua;./lua/?.lua"
|
||||
local config = require("tokyonight.config")
|
||||
local kitty = require("tokyonight.extra.kitty")
|
||||
local fish = require("tokyonight.extra.fish")
|
||||
local alacritty = require("tokyonight.extra.alacritty")
|
||||
|
||||
local function write(str, fileName)
|
||||
print("[write] extra/" .. fileName)
|
||||
@@ -15,8 +16,11 @@ config.style = "storm"
|
||||
|
||||
write(kitty.kitty(config), "kitty_tokyonight_storm.conf")
|
||||
write(fish.fish(config), "fish_tokyonight_storm.fish")
|
||||
write(alacritty.alacritty(config), "alacritty_tokyonight_storm.yml")
|
||||
|
||||
config.style = "night"
|
||||
|
||||
write(kitty.kitty(config), "kitty_tokyonight_night.conf")
|
||||
write(fish.fish(config), "fish_tokyonight_night.fish")
|
||||
write(alacritty.alacritty(config), "alacritty_tokyonight_night.yml")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user