Skip to content

Commit bc07be5

Browse files
committed
feat(extras): add Foot theme
1 parent 98313e9 commit bc07be5

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

lua/astrotheme/extras/foot.lua

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
local util = require "astrotheme.extras"
2+
3+
local M = {}
4+
5+
--- @param colors AstroThemePalette
6+
function M.generate(colors)
7+
local function normalize_colors(_colors)
8+
local new_colors = {}
9+
for k, v in pairs(_colors) do
10+
new_colors[k] = type(v) == "string" and v:gsub("^#", "") or normalize_colors(v)
11+
end
12+
return new_colors
13+
end
14+
return util.template(
15+
[[
16+
[cursor]
17+
color=${syntax.text} ${ui.selection}
18+
19+
[colors]
20+
foreground=${syntax.text}
21+
background=${ui.base}
22+
selection-foreground=${syntax.text}
23+
selection-background=${ui.selection}
24+
urls=${syntax.blue}
25+
26+
regular0=${term.black}
27+
regular1=${term.red}
28+
regular2=${term.green}
29+
regular3=${term.yellow}
30+
regular4=${term.blue}
31+
regular5=${term.purple}
32+
regular6=${term.cyan}
33+
regular7=${term.white}
34+
35+
bright0=${term.bright_black}
36+
bright1=${term.bright_red}
37+
bright2=${term.bright_green}
38+
bright3=${term.bright_yellow}
39+
bright4=${term.bright_blue}
40+
bright5=${term.bright_purple}
41+
bright6=${term.bright_cyan}
42+
bright7=${term.bright_white}
43+
44+
16=${ui.orange}
45+
17=${ui.red}]],
46+
normalize_colors(colors)
47+
)
48+
end
49+
50+
return M

lua/astrotheme/extras/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ M.extras = {
1717
dunst = { ext = "dunstrc", url = "https://dunst-project.org/", label = "Dunst" },
1818
fish = { ext = "fish", url = "https://fishshell.com/docs/current/index.html", label = "Fish" },
1919
fish_themes = { ext = "theme", url = "https://fishshell.com/docs/current/interactive.html#syntax-highlighting", label = "Fish Themes" },
20+
foot = { ext = "ini", url = "https://codeberg.org/dnkl/foot", label = "Foot" },
2021
}
2122

2223
function M.setup()

0 commit comments

Comments
 (0)