Skip to content

Commit e72a6b8

Browse files
committed
feat(extras): add fuzzel theme
1 parent d412f31 commit e72a6b8

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

lua/astrotheme/extras/fuzzel.lua

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
local new_color = v
11+
if type(v) == "string" and v:match "^#" then
12+
new_color = v:gsub("^#", "") .. "FF"
13+
elseif type(v) == "table" then
14+
new_color = normalize_colors(v)
15+
end
16+
new_colors[k] = new_color
17+
end
18+
return new_colors
19+
end
20+
return util.template(
21+
[[
22+
[colors]
23+
background=${ui.float}
24+
text=${ui.text}
25+
match=${ui.accent}
26+
selection=${ui.selection}
27+
selection-match=${ui.accent}
28+
selection-text=${ui.text}
29+
border=${ui.border}
30+
]],
31+
normalize_colors(colors)
32+
)
33+
end
34+
35+
return M

lua/astrotheme/extras/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ M.extras = {
1515
fish = { ext = "fish", url = "https://fishshell.com/docs/current/index.html", label = "Fish" },
1616
fish_themes = { ext = "theme", url = "https://fishshell.com/docs/current/interactive.html#syntax-highlighting", label = "Fish Themes" },
1717
foot = { ext = "ini", url = "https://codeberg.org/dnkl/foot", label = "Foot" },
18+
fuzzel = { ext = "ini", url = "https://codeberg.org/dnkl/fuzzel", label = "Fuzzel" },
1819
fzf = { ext = "sh", url = "https://github.com/junegunn/fzf", label = "Fzf" },
1920
ghostty = { ext = "config", url = "https://github.com/ghostty-org", label = "Ghostty" },
2021
gitui = { ext = "ron", url = "https://github.com/extrawurst/gitui", label = "GitUI" },

0 commit comments

Comments
 (0)