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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 205 additions and 176 deletions

View File

@ -0,0 +1,41 @@
# TokyoNight Alacritty Colors
# Default colors
[colors.primary]
background = '#e1e2e7'
foreground = '#3760bf'
#[colors.cursor]
#cursor = '#3760bf'
#text = '#e1e2e7'
# Normal colors
[colors.normal]
black = '#e9e9ed'
red = '#f52a65'
green = '#587539'
yellow = '#8c6c3e'
blue = '#2e7de9'
magenta = '#9854f1'
cyan = '#007197'
white = '#6172b0'
# Bright colors
[colors.bright]
black = '#a1a6c5'
red = '#f52a65'
green = '#587539'
yellow = '#8c6c3e'
blue = '#2e7de9'
magenta = '#9854f1'
cyan = '#007197'
white = '#3760bf'
# Indexed Colors
[[colors.indexed_colors]]
index = 16
color = '#b15c00'
[[colors.indexed_colors]]
index = 17
color = '#c64343'

View File

@ -1,34 +0,0 @@
# TokyoNight Alacritty Colors
colors:
# Default colors
primary:
background: '0xe1e2e7'
foreground: '0x3760bf'
# Normal colors
normal:
black: '0xe9e9ed'
red: '0xf52a65'
green: '0x587539'
yellow: '0x8c6c3e'
blue: '0x2e7de9'
magenta: '0x9854f1'
cyan: '0x007197'
white: '0x6172b0'
# Bright colors
bright:
black: '0xa1a6c5'
red: '0xf52a65'
green: '0x587539'
yellow: '0x8c6c3e'
blue: '0x2e7de9'
magenta: '0x9854f1'
cyan: '0x007197'
white: '0x3760bf'
indexed_colors:
- { index: 16, color: '0xb15c00' }
- { index: 17, color: '0xc64343' }

View File

@ -0,0 +1,41 @@
# TokyoNight Alacritty Colors
# Default colors
[colors.primary]
background = '#222436'
foreground = '#c8d3f5'
#[colors.cursor]
#cursor = '#c8d3f5'
#text = '#222436'
# Normal colors
[colors.normal]
black = '#1b1d2b'
red = '#ff757f'
green = '#c3e88d'
yellow = '#ffc777'
blue = '#82aaff'
magenta = '#c099ff'
cyan = '#86e1fc'
white = '#828bb8'
# Bright colors
[colors.bright]
black = '#444a73'
red = '#ff757f'
green = '#c3e88d'
yellow = '#ffc777'
blue = '#82aaff'
magenta = '#c099ff'
cyan = '#86e1fc'
white = '#c8d3f5'
# Indexed Colors
[[colors.indexed_colors]]
index = 16
color = '#ff966c'
[[colors.indexed_colors]]
index = 17
color = '#c53b53'

View File

@ -1,34 +0,0 @@
# TokyoNight Alacritty Colors
colors:
# Default colors
primary:
background: '0x222436'
foreground: '0xc8d3f5'
# Normal colors
normal:
black: '0x1b1d2b'
red: '0xff757f'
green: '0xc3e88d'
yellow: '0xffc777'
blue: '0x82aaff'
magenta: '0xc099ff'
cyan: '0x86e1fc'
white: '0x828bb8'
# Bright colors
bright:
black: '0x444a73'
red: '0xff757f'
green: '0xc3e88d'
yellow: '0xffc777'
blue: '0x82aaff'
magenta: '0xc099ff'
cyan: '0x86e1fc'
white: '0xc8d3f5'
indexed_colors:
- { index: 16, color: '0xff966c' }
- { index: 17, color: '0xc53b53' }

View File

@ -0,0 +1,41 @@
# TokyoNight Alacritty Colors
# Default colors
[colors.primary]
background = '#1a1b26'
foreground = '#c0caf5'
#[colors.cursor]
#cursor = '#c0caf5'
#text = '#1a1b26'
# Normal colors
[colors.normal]
black = '#15161e'
red = '#f7768e'
green = '#9ece6a'
yellow = '#e0af68'
blue = '#7aa2f7'
magenta = '#bb9af7'
cyan = '#7dcfff'
white = '#a9b1d6'
# Bright colors
[colors.bright]
black = '#414868'
red = '#f7768e'
green = '#9ece6a'
yellow = '#e0af68'
blue = '#7aa2f7'
magenta = '#bb9af7'
cyan = '#7dcfff'
white = '#c0caf5'
# Indexed Colors
[[colors.indexed_colors]]
index = 16
color = '#ff9e64'
[[colors.indexed_colors]]
index = 17
color = '#db4b4b'

View File

@ -1,34 +0,0 @@
# 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: '0x414868'
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,41 @@
# TokyoNight Alacritty Colors
# Default colors
[colors.primary]
background = '#24283b'
foreground = '#c0caf5'
#[colors.cursor]
#cursor = '#c0caf5'
#text = '#24283b'
# Normal colors
[colors.normal]
black = '#1d202f'
red = '#f7768e'
green = '#9ece6a'
yellow = '#e0af68'
blue = '#7aa2f7'
magenta = '#bb9af7'
cyan = '#7dcfff'
white = '#a9b1d6'
# Bright colors
[colors.bright]
black = '#414868'
red = '#f7768e'
green = '#9ece6a'
yellow = '#e0af68'
blue = '#7aa2f7'
magenta = '#bb9af7'
cyan = '#7dcfff'
white = '#c0caf5'
# Indexed Colors
[[colors.indexed_colors]]
index = 16
color = '#ff9e64'
[[colors.indexed_colors]]
index = 17
color = '#db4b4b'

View File

@ -1,34 +0,0 @@
# 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: '0x414868'
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

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

View File

@ -7,7 +7,7 @@ M.extras = {
kitty = {ext = "conf", url = "https://sw.kovidgoyal.net/kitty/conf.html", label = "Kitty"}, 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 = {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"}, 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"}, 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"}, 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"}, xresources = {ext = "Xresources", url = "https://wiki.archlinux.org/title/X_resources", label = "Xresources"},