Skip to content

Commit

Permalink
feat(extras): add XResources theme
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Jul 12, 2024
1 parent f6ecafe commit 8d12833
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions lua/astrotheme/extras/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ M.extras = {
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" },
xfceterm = { ext = "theme", url = "https://docs.xfce.org/apps/terminal/advanced", label = "Xfce Terminal" },
xresources = { ext = "Xresources", url = "https://wiki.archlinux.org/title/X_resources", label = "Xresources" },
}

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

local M = {}

--- @param colors AstroThemePalette
function M.generate(colors)
return util.template(
[[
! ${_style_name} colors for Xresources
*background: ${ui.base}
*foreground: ${syntax.text}
*color0: ${term.black}
*color1: ${term.red}
*color2: ${term.green}
*color3: ${term.yellow}
*color4: ${term.blue}
*color5: ${term.purple}
*color6: ${term.cyan}
*color7: ${term.white}
*color8: ${term.bright_black}
*color9: ${term.bright_red}
*color10: ${term.bright_green}
*color11: ${term.bright_yellow}
*color12: ${term.bright_blue}
*color13: ${term.bright_purple}
*color14: ${term.bright_cyan}
*color15: ${term.bright_white}
]],
colors
)
end

return M

0 comments on commit 8d12833

Please sign in to comment.