feat(kitty): kitty colors working properly

This commit is contained in:
Redoxahmii 2024-11-23 08:25:07 +05:00
parent 5403f91bf9
commit f75535eb3d
8 changed files with 142 additions and 234 deletions

View file

@ -1,50 +0,0 @@
# vim:ft=kitty
## name: Tokyo Night Day
## license: MIT
## author: Folke Lemaitre
## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_day.conf
background #e1e2e7
foreground #3760bf
selection_background #b6bfe2
selection_foreground #3760bf
url_color #387068
cursor #3760bf
cursor_text_color #e1e2e7
# Tabs
active_tab_background #2e7de9
active_tab_foreground #e9e9ec
inactive_tab_background #c4c8da
inactive_tab_foreground #8990b3
#tab_bar_background #e9e9ed
# Windows
active_border_color #2e7de9
inactive_border_color #c4c8da
# normal
color0 #e9e9ed
color1 #f52a65
color2 #587539
color3 #8c6c3e
color4 #2e7de9
color5 #9854f1
color6 #007197
color7 #6172b0
# bright
color8 #a1a6c5
color9 #f52a65
color10 #587539
color11 #8c6c3e
color12 #2e7de9
color13 #9854f1
color14 #007197
color15 #3760bf
# extended colors
color16 #b15c00
color17 #c64343

View file

@ -1,50 +0,0 @@
# vim:ft=kitty
## name: Tokyo Night Moon
## license: MIT
## author: Folke Lemaitre
## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_moon.conf
background #222436
foreground #c8d3f5
selection_background #2d3f76
selection_foreground #c8d3f5
url_color #4fd6be
cursor #c8d3f5
cursor_text_color #222436
# Tabs
active_tab_background #82aaff
active_tab_foreground #1e2030
inactive_tab_background #2f334d
inactive_tab_foreground #545c7e
#tab_bar_background #1b1d2b
# Windows
active_border_color #82aaff
inactive_border_color #2f334d
# normal
color0 #1b1d2b
color1 #ff757f
color2 #c3e88d
color3 #ffc777
color4 #82aaff
color5 #c099ff
color6 #86e1fc
color7 #828bb8
# bright
color8 #444a73
color9 #ff757f
color10 #c3e88d
color11 #ffc777
color12 #82aaff
color13 #c099ff
color14 #86e1fc
color15 #c8d3f5
# extended colors
color16 #ff966c
color17 #c53b53

View file

@ -1,50 +0,0 @@
# vim:ft=kitty
## name: Tokyo Night
## license: MIT
## author: Folke Lemaitre
## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_night.conf
background #1a1b26
foreground #c0caf5
selection_background #283457
selection_foreground #c0caf5
url_color #73daca
cursor #c0caf5
cursor_text_color #1a1b26
# Tabs
active_tab_background #7aa2f7
active_tab_foreground #16161e
inactive_tab_background #292e42
inactive_tab_foreground #545c7e
#tab_bar_background #15161e
# Windows
active_border_color #7aa2f7
inactive_border_color #292e42
# normal
color0 #15161e
color1 #f7768e
color2 #9ece6a
color3 #e0af68
color4 #7aa2f7
color5 #bb9af7
color6 #7dcfff
color7 #a9b1d6
# bright
color8 #414868
color9 #f7768e
color10 #9ece6a
color11 #e0af68
color12 #7aa2f7
color13 #bb9af7
color14 #7dcfff
color15 #c0caf5
# extended colors
color16 #ff9e64
color17 #db4b4b

View file

@ -1,50 +0,0 @@
# vim:ft=kitty
## name: Tokyo Night Storm
## license: MIT
## author: Folke Lemaitre
## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_storm.conf
background #24283b
foreground #c0caf5
selection_background #2e3c64
selection_foreground #c0caf5
url_color #73daca
cursor #c0caf5
cursor_text_color #24283b
# Tabs
active_tab_background #7aa2f7
active_tab_foreground #1f2335
inactive_tab_background #292e42
inactive_tab_foreground #545c7e
#tab_bar_background #1d202f
# Windows
active_border_color #7aa2f7
inactive_border_color #292e42
# normal
color0 #1d202f
color1 #f7768e
color2 #9ece6a
color3 #e0af68
color4 #7aa2f7
color5 #bb9af7
color6 #7dcfff
color7 #a9b1d6
# bright
color8 #414868
color9 #f7768e
color10 #9ece6a
color11 #e0af68
color12 #7aa2f7
color13 #bb9af7
color14 #7dcfff
color15 #c0caf5
# extended colors
color16 #ff9e64
color17 #db4b4b

View file

@ -0,0 +1,50 @@
# vim:ft=kitty
## name: Solarized Osaka Day
## license: MIT
## author: Folke Lemaitre
## upstream: https://github.com/craftzdog/solarized-osaka.nvim/raw/main/extras/kitty/solarized_osaka_day.conf
background #d9f5ff
foreground #566162
selection_background #87ddff
selection_foreground #566162
url_color #279a91
cursor #566162
cursor_text_color #d9f5ff
# Tabs
active_tab_background #279a91
active_tab_foreground #474747
inactive_tab_background #87ddff
inactive_tab_foreground #667c84
#tab_bar_background #e2f8ff
# Windows
active_border_color #1c6da7
inactive_border_color #87ddff
# normal
color0 #e2f8ff
color1 #e73330
color2 #576600
color3 #7e5d00
color4 #1c6da7
color5 #d73884
color6 #279a91
color7 #566162
# bright
color8 #6e8992
color9 #e73330
color10 #576600
color11 #7e5d00
color12 #1c6da7
color13 #d73884
color14 #279a91
color15 #566162
# extended colors
color16 #d14f17
color17 #be2420

View file

@ -0,0 +1,50 @@
# vim:ft=kitty
## name: Solarized Osaka
## license: MIT
## author: Folke Lemaitre
## upstream: https://github.com/craftzdog/solarized-osaka.nvim/raw/main/extras/kitty/solarized_osaka_night.conf
background #001419
foreground #839395
selection_background #002c38
selection_foreground #839395
url_color #29a298
cursor #839395
cursor_text_color #001419
# Tabs
active_tab_background #29a298
active_tab_foreground #ffffff
inactive_tab_background #002c38
inactive_tab_foreground #637981
#tab_bar_background #001014
# Windows
active_border_color #268bd3
inactive_border_color #002c38
# normal
color0 #001014
color1 #db302d
color2 #849900
color3 #b28500
color4 #268bd3
color5 #d23681
color6 #29a298
color7 #839395
# bright
color8 #576d74
color9 #db302d
color10 #849900
color11 #b28500
color12 #268bd3
color13 #d23681
color14 #29a298
color15 #839395
# extended colors
color16 #c94c16
color17 #f55350

View file

@ -4,32 +4,36 @@ local M = {}
--- @type table<string, {ext:string, url:string, label:string}>
-- stylua: ignore
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"},
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"},
xfceterm = {ext = "theme", url = "https://docs.xfce.org/apps/terminal/advanced", label = "Xfce Terminal"},
foot = {ext = "ini", url = "https://codeberg.org/dnkl/foot", label = "Foot"},
tilix = {ext = "json", url = "https://github.com/gnunn1/tilix", label = "Tilix"},
-- 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"},
-- 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"},
-- xfceterm = {ext = "theme", url = "https://docs.xfce.org/apps/terminal/advanced", label = "Xfce Terminal"},
-- foot = {ext = "ini", url = "https://codeberg.org/dnkl/foot", label = "Foot"},
-- tilix = {ext = "json", url = "https://github.com/gnunn1/tilix", label = "Tilix"},
-- ISSUE: this line crashes the program, probably would fix if the other issues are fixed though.
iterm = {ext = "itermcolors", url = "https://iterm2.com/", label = "iTerm"},
lua = {ext = "lua", url = "https://www.lua.org", label = "Lua Table for testing"},
sublime = {ext = "tmTheme", url = "https://www.sublimetext.com/docs/themes", label = "Sublime Text"},
delta = {ext = "gitconfig", url = "https://github.com/dandavison/delta", label = "Delta"},
terminator = {ext = "conf", url = "https://gnome-terminator.readthedocs.io/en/latest/config.html", label = "Terminator"},
prism = {ext = "js", url = "https://prismjs.com", label = "Prism"},
windows_terminal = {ext = "json", url = "https://aka.ms/terminal-documentation", label = "Windows Terminal"},
zathura = {ext = "zathurarc", url = "https://pwmt.org/projects/zathura/", label = "Zathura"},
dunst = {ext = "dunstrc", url = "https://dunst-project.org/", label = "Dunst"},
gitui = {ext = "ron", url = "https://github.com/extrawurst/gitui", label = "GitUI"},
-- lua = {ext = "lua", url = "https://www.lua.org", label = "Lua Table for testing"},
-- sublime = {ext = "tmTheme", url = "https://www.sublimetext.com/docs/themes", label = "Sublime Text"},
-- delta = {ext = "gitconfig", url = "https://github.com/dandavison/delta", label = "Delta"},
-- terminator = {ext = "conf", url = "https://gnome-terminator.readthedocs.io/en/latest/config.html", label = "Terminator"},
-- prism = {ext = "js", url = "https://prismjs.com", label = "Prism"},
-- windows_terminal = {ext = "json", url = "https://aka.ms/terminal-documentation", label = "Windows Terminal"},
-- zathura = {ext = "zathurarc", url = "https://pwmt.org/projects/zathura/", label = "Zathura"},
-- dunst = {ext = "dunstrc", url = "https://dunst-project.org/", label = "Dunst"},
-- gitui = {ext = "ron", url = "https://github.com/extrawurst/gitui", label = "GitUI"},
}
local function write(str, fileName)
print("[write] extra/" .. fileName)
vim.fn.mkdir(vim.fs.dirname("extras/" .. fileName), "p")
local file = io.open("extras/" .. fileName, "w")
if not file then
return
end
file:write(str)
file:close()
end
@ -67,25 +71,29 @@ end
function M.setup()
M.docs()
local config = require("solarized-osaka.config")
vim.o.background = "dark"
-- map of style to style name
-- Remove the unused styles
local styles = {
storm = " Storm",
night = "",
day = " Day",
moon = " Moon",
}
for extra, info in pairs(M.extras) do
package.loaded["solarized-osaka.extra." .. extra] = nil
local plugin = require("solarized-osaka.extra." .. extra)
-- Enable the background for day and night? I think this is needed.
for style, style_name in pairs(styles) do
config.setup({ style = style })
if style == "night" then
vim.o.background = "dark"
elseif style == "day" then
vim.o.background = "light"
end
config.setup({ style = style, use_background = "auto" })
local colors = require("solarized-osaka.colors").setup({ transform = true })
local fname = extra .. "/tokyonight_" .. style .. "." .. info.ext
colors["_upstream_url"] = "https://github.com/folke/tokyonight.nvim/raw/main/extras/" .. fname
colors["_style_name"] = "Tokyo Night" .. style_name
local fname = extra .. "/solarized_osaka_" .. style .. "." .. info.ext
colors["_upstream_url"] = "https://github.com/craftzdog/solarized-osaka.nvim/raw/main/extras/" .. fname
colors["_style_name"] = "Solarized Osaka" .. style_name
write(plugin.generate(colors), fname)
end
end

View file

@ -16,17 +16,17 @@ function M.generate(colors)
background ${bg}
foreground ${fg}
selection_background ${bg_visual}
selection_background ${base03}
selection_foreground ${fg}
url_color ${green1}
url_color ${cyan}
cursor ${fg}
cursor_text_color ${bg}
# Tabs
active_tab_background ${blue}
active_tab_foreground ${bg_dark}
active_tab_background ${cyan}
active_tab_foreground ${base4}
inactive_tab_background ${bg_highlight}
inactive_tab_foreground ${dark3}
inactive_tab_foreground ${base00}
#tab_bar_background ${black}
# Windows
@ -41,10 +41,10 @@ color3 ${yellow}
color4 ${blue}
color5 ${magenta}
color6 ${cyan}
color7 ${fg_dark}
color7 ${fg}
# bright
color8 ${terminal_black}
color8 ${base01}
color9 ${red}
color10 ${green}
color11 ${yellow}
@ -55,7 +55,7 @@ color15 ${fg}
# extended colors
color16 ${orange}
color17 ${red1}
color17 ${red300}
]],
colors
)