Skip to content

Commit 4a5caf2

Browse files
committed
feat(extras): add yazi colorscheme
1 parent 6ded3d5 commit 4a5caf2

File tree

2 files changed

+143
-0
lines changed

2 files changed

+143
-0
lines changed

lua/astrotheme/extras/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ M.extras = {
3434
windows_terminal = { ext = "json", url = "https://aka.ms/terminal-documentation", label = "Windows Terminal" },
3535
xfceterm = { ext = "theme", url = "https://docs.xfce.org/apps/terminal/advanced", label = "Xfce Terminal" },
3636
xresources = { ext = "Xresources", url = "https://wiki.archlinux.org/title/X_resources", label = "Xresources" },
37+
yazi = { ext = "toml", url = "https://github.com/sxyazi/yazi", label = "Yazi" },
3738
zathura = { ext = "zathurarc", url = "https://pwmt.org/projects/zathura/", label = "Zathura" },
3839
zellij = { ext = "kdl", url = "https://zellij.dev/", label = "Zellij" },
3940
}

lua/astrotheme/extras/yazi.lua

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
local util = require "astrotheme.extras"
2+
3+
local M = {}
4+
5+
--- @param colors AstroThemePalette
6+
function M.generate(colors)
7+
return util.template(
8+
[[
9+
[manager]
10+
# NOTE: can combined with tmTheme (sublime colorshceme file) for preview code highlight
11+
# highlight = "path/to/tmTheme"
12+
13+
cwd = { fg = "${ui.text_inactive}", italic = true }
14+
15+
# Hovered
16+
hovered = { bg = "${ui.selection}" }
17+
preview_hovered = { bg = "${ui.selection}" }
18+
19+
# Find
20+
find_keyword = { fg = "${ui.base}", bg = "${ui.orange}", bold = true }
21+
find_position = { fg = "${ui.blue}", bg = "${ui.selection}", bold = true }
22+
23+
# Marker
24+
marker_copied = { fg = "${ui.green}", bg = "${ui.green}" }
25+
marker_cut = { fg = "${ui.red}", bg = "${ui.red}" }
26+
marker_marked = { fg = "${ui.purple}", bg = "${ui.purple}" }
27+
marker_selected = { fg = "${ui.blue}", bg = "${ui.blue}" }
28+
29+
# Tab
30+
tab_active = { fg = "${ui.text_active}", bg = "${ui.base}" }
31+
tab_inactive = { fg = "${ui.text_inactive}", bg = "${ui.tabline}" }
32+
tab_width = 1
33+
34+
# Count
35+
count_copied = { fg = "${ui.text}", bg = "${ui.green}" }
36+
count_cut = { fg = "${ui.text}", bg = "${ui.red}" }
37+
count_selected = { fg = "${ui.text}", bg = "${ui.accent}" }
38+
# Border
39+
border_symbol = "│"
40+
border_style = { fg = "${ui.border}" }
41+
42+
[status]
43+
separator_open = ""
44+
separator_close = ""
45+
separator_style = { fg = "${ui.none_text}", bg = "${ui.none_text}" }
46+
47+
# Mode
48+
mode_normal = { fg = "${ui.base}", bg = "${ui.blue}", bold = true }
49+
mode_select = { fg = "${ui.base}", bg = "${ui.purple}", bold = true }
50+
mode_unset = { fg = "${ui.base}", bg = "${ui.red}", bold = true }
51+
52+
# Progress
53+
progress_label = { fg = "${ui.text_inactive}", bold = true }
54+
progress_normal = { fg = "${ui.base}" }
55+
progress_error = { fg = "${ui.red}" }
56+
57+
# Permissions
58+
permissions_t = { fg = "${ui.blue}" }
59+
permissions_r = { fg = "${ui.yellow}" }
60+
permissions_w = { fg = "${ui.red}" }
61+
permissions_x = { fg = "${ui.green}" }
62+
permissions_s = { fg = "${ui.none_text}" }
63+
64+
[select]
65+
border = { fg = "${ui.border}" }
66+
active = { fg = "${ui.text}", bg = "${ui.selection}" }
67+
inactive = { fg = "${ui.text}" }
68+
69+
# Input
70+
[input]
71+
border = { fg = "${ui.accent}" }
72+
title = { fg = "${ui.title}" }
73+
value = { fg = "${ui.purple}" }
74+
selected = { bg = "${ui.selection}" }
75+
76+
# Completion
77+
[completion]
78+
border = { fg = "${ui.accent}" }
79+
active = { fg = "${ui.text}", bg = "${ui.selection}" }
80+
inactive = { fg = "${ui.text}" }
81+
82+
# Tasks
83+
[tasks]
84+
border = { fg = "${ui.border}" }
85+
title = { fg = "${ui.title}" }
86+
hovered = { fg = "${ui.text}", bg="${ui.selection}" }
87+
88+
# Which
89+
[which]
90+
cols = 3
91+
mask = { bg = "${ui.inactive_base}" }
92+
cand = { fg = "${ui.cyan}" }
93+
rest = { fg = "${ui.blue}" }
94+
desc = { fg = "${ui.purple}" }
95+
separator = "  "
96+
separator_style = { fg = "${ui.none_text}" }
97+
98+
# Notify
99+
[notify]
100+
title_info = { fg = "${ui.title}" }
101+
title_warn = { fg = "${ui.yellow}" }
102+
title_error = { fg = "${ui.red}" }
103+
104+
# Help
105+
[help]
106+
on = { fg = "${ui.green}" }
107+
run = { fg = "${ui.purple}" }
108+
hovered = { bg = "${ui.selection}" }
109+
footer = { fg = "${ui.text}", bg = "${ui.base}" }
110+
111+
[filetype]
112+
113+
rules = [
114+
# Images
115+
{ mime = "image/*", fg = "${syntax.yellow}" },
116+
117+
# Media
118+
{ mime = "{audio,video}/*", fg = "${syntax.purple}" },
119+
120+
# Archives
121+
{ mime = "application/*zip", fg = "${syntax.red}" },
122+
{ mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", fg = "${syntax.red}" },
123+
124+
# Documents
125+
{ mime = "application/{pdf,doc,rtf,vnd.*}", fg = "${syntax.cyan}" },
126+
127+
# Empty files
128+
# { mime = "inode/x-empty", fg = "${syntax.red}" },
129+
130+
# Special files
131+
{ name = "*", is = "orphan", bg = "${syntax.red}" },
132+
{ name = "*", is = "exec" , fg = "${syntax.green}" },
133+
134+
# Fallback
135+
{ name = "*/", fg = "${syntax.blue}" }
136+
]
137+
]],
138+
colors
139+
)
140+
end
141+
142+
return M

0 commit comments

Comments
 (0)