Skip to content

Commit

Permalink
feat(extras): add Windows Terminal theme
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Jul 12, 2024
1 parent 0c7adf2 commit 6e92bf7
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/astrotheme/extras/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ local M = {}
-- stylua: ignore
M.extras = {
-- Keep all entries here aligned by the first `=` sign
vim = { ext = "vim", url = "https://vimhelp.org/", label = "Vim", subdir = "colors"},
wezterm = { ext = "toml", url = "https://wezfurlong.org/wezterm/config/files.html", label = "WezTerm" },
alacritty = { ext = "toml", url = "https://github.com/alacritty/alacritty", label = "Alacritty" },
delta = { ext = "gitconfig", url = "https://github.com/dandavison/delta", label = "Delta" },
dunst = { ext = "dunstrc", url = "https://dunst-project.org/", label = "Dunst" },
Expand All @@ -27,6 +25,9 @@ M.extras = {
spotify_player = {ext = "toml", url = "https://github.com/aome510/spotify-player", label = "Spotify Player"},
terminator = { ext = "conf", url = "https://gnome-terminator.readthedocs.io/en/latest/config.html", label = "Terminator" },
tilix = { ext = "json", url = "https://github.com/gnunn1/tilix", label = "Tilix" },
vim = { ext = "vim", url = "https://vimhelp.org/", label = "Vim", subdir = "colors"},
wezterm = { ext = "toml", url = "https://wezfurlong.org/wezterm/config/files.html", label = "WezTerm" },
windows_terminal = { ext = "json", url = "https://aka.ms/terminal-documentation", label = "Windows Terminal" },
}

function M.setup()
Expand Down
39 changes: 39 additions & 0 deletions lua/astrotheme/extras/windows_terminal.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
local util = require "astrotheme.extras"

local M = {}

--- @param colors AstroThemePalette
function M.generate(colors)
return util.template(
[[
# Add the following object to your Windows Terminal configuration
# https://learn.microsoft.com/en-us/windows/terminal/customize-settings/color-schemes#creating-your-own-color-scheme
{
"background": "${ui.base}",
"black": "${term.black}",
"blue": "${term.blue}",
"brightBlack": "${term.bright_black}",
"brightBlue": "${term.bright_blue}",
"brightCyan": "${term.bright_cyan}",
"brightGreen": "${term.bright_green}",
"brightPurple": "${term.bright_purple}",
"brightRed": "${term.bright_red}",
"brightWhite": "${term.bright_white}",
"brightYellow": "${term.bright_yellow}",
"cursorColor": "${syntax.text}",
"cyan": "${term.cyan}",
"foreground": "${syntax.text}",
"green": "${term.green}",
"name": "${_style_name}",
"purple": "${term.purple}",
"red": "${term.red}",
"selectionBackground": "${ui.selection}",
"white": "${term.white}",
"yellow": "${term.yellow}"
}
]],
colors
)
end

return M

0 comments on commit 6e92bf7

Please sign in to comment.