Skip to content

Commit

Permalink
feat(extras): added Ghostty themes
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Oct 23, 2024
1 parent 60e23bd commit c805eb8
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
37 changes: 37 additions & 0 deletions lua/tokyonight/extra/ghostty.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
local util = require("tokyonight.util")

local M = {}

--- @param colors ColorScheme
function M.generate(colors)
local theme = util.template(
[[
palette = 0=${terminal.black}
palette = 1=${terminal.red}
palette = 2=${terminal.green}
palette = 3=${terminal.yellow}
palette = 4=${terminal.blue}
palette = 5=${terminal.magenta}
palette = 6=${terminal.cyan}
palette = 7=${terminal.white}
palette = 8=${terminal.black_bright}
palette = 9=${terminal.red_bright}
palette = 10=${terminal.green_bright}
palette = 11=${terminal.yellow_bright}
palette = 12=${terminal.blue_bright}
palette = 13=${terminal.magenta_bright}
palette = 14=${terminal.cyan_bright}
palette = 15=${terminal.white_bright}
background = ${bg}
foreground = ${fg}
cursor-color = ${fg}
selection-background = ${bg_visual}
selection-foreground = ${fg}
]],
colors
)
return theme
end

return M
2 changes: 2 additions & 0 deletions lua/tokyonight/extra/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ M.extras = {
foot = { ext = "ini", url = "https://codeberg.org/dnkl/foot", label = "Foot" },
fuzzel = { ext = "ini", url = "https://codeberg.org/dnkl/fuzzel", label = "Fuzzel" },
fzf = { ext = "sh", url = "https://github.com/junegunn/fzf", label = "Fzf" },
ghostty = { ext = "", url = "https://github.com/ghostty-org/ghostty", label = "Ghostty" },
gitui = { ext = "ron", url = "https://github.com/extrawurst/gitui", label = "GitUI" },
gnome_terminal = { ext = "dconf", url = "https://gitlab.gnome.org/GNOME/gnome-terminal", label = "GNOME Terminal" },
helix = { ext = "toml", url = "https://helix-editor.com/", label = "Helix" },
Expand Down Expand Up @@ -70,6 +71,7 @@ function M.setup()
.. style
.. "."
.. info.ext
fname = string.gsub(fname, "%.$", "") -- remove trailing dot when no extension
colors["_upstream_url"] = "https://github.com/folke/tokyonight.nvim/raw/main/extras/" .. fname
colors["_style_name"] = "Tokyo Night" .. style_name
colors["_name"] = "tokyonight_" .. style
Expand Down

0 comments on commit c805eb8

Please sign in to comment.