feat: changed alacritty .yml to .toml (#450)

* feat: changed alacritty .yml to .toml

* feat: using hex colors for alacritty

* added *toml, removed *.yml
This commit is contained in:
Joseph Sebastian
2024-01-20 12:17:47 +01:00
committed by GitHub
parent 4d0d0a82ed
commit ffc7505a14
10 changed files with 205 additions and 176 deletions

View File

@@ -4,50 +4,51 @@ local M = {}
--- @param colors ColorScheme
function M.generate(colors)
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}'
# Default colors
[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}'
#[colors.cursor]
#cursor = '${fg}'
#text = '${bg}'
# Bright colors
bright:
black: '${terminal_black}'
red: '${red}'
green: '${green}'
yellow: '${yellow}'
blue: '${blue}'
magenta: '${magenta}'
cyan: '${cyan}'
white: '${fg}'
# Normal colors
[colors.normal]
black = '${black}'
red = '${red}'
green = '${green}'
yellow = '${yellow}'
blue = '${blue}'
magenta = '${magenta}'
cyan = '${cyan}'
white = '${fg_dark}'
indexed_colors:
- { index: 16, color: '${orange}' }
- { index: 17, color: '${red1}' }
]],
alacrittyColors
# Bright colors
[colors.bright]
black = '${terminal_black}'
red = '${red}'
green = '${green}'
yellow = '${yellow}'
blue = '${blue}'
magenta = '${magenta}'
cyan = '${cyan}'
white = '${fg}'
# Indexed Colors
[[colors.indexed_colors]]
index = 16
color = '${orange}'
[[colors.indexed_colors]]
index = 17
color = '${red1}'
]=],
colors
)
return alacritty

View File

@@ -7,7 +7,7 @@ M.extras = {
kitty = {ext = "conf", url = "https://sw.kovidgoyal.net/kitty/conf.html", label = "Kitty"},
fish = {ext = "fish", url = "https://fishshell.com/docs/current/index.html", label = "Fish"},
fish_themes = {ext = "theme", url = "https://fishshell.com/docs/current/interactive.html#syntax-highlighting", label = "Fish Themes"},
alacritty = {ext = "yml", url = "https://github.com/alacritty/alacritty", label = "Alacritty"},
alacritty = {ext = "toml", url = "https://github.com/alacritty/alacritty", label = "Alacritty"},
wezterm = {ext = "toml", url = "https://wezfurlong.org/wezterm/config/files.html", label = "WezTerm"},
tmux = {ext = "tmux", url = "https://github.com/tmux/tmux/wiki", label = "Tmux"},
xresources = {ext = "Xresources", url = "https://wiki.archlinux.org/title/X_resources", label = "Xresources"},