Skip to content

Commit a6d723a

Browse files
committed
feat(extras): add aerc theme
1 parent 162bc34 commit a6d723a

File tree

3 files changed

+104
-2
lines changed

3 files changed

+104
-2
lines changed

lua/modus-themes/colors.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ function M.setup(opts)
456456
colors.warning = colors.yellow_cooler
457457
colors.info = colors.blue_cooler
458458
colors.hint = colors.cyan_cooler
459+
colors.success = colors.fg_added
459460
colors.visual = colors.bg_magenta_intense
460461
colors.accent_light = colors.blue_faint
461462
colors.accent = colors.blue_warmer
@@ -535,6 +536,7 @@ function M.setup(opts)
535536
colors.error = colors.deuteranopia_yellow_warmer
536537
colors.warning = colors.deuteranopia_yellow
537538
colors.info = colors.blue
539+
colors.success = colors.deuteranopia_fg_added
538540

539541
if style == "modus_operandi" then
540542
colors.cursor = colors.blue_intense
@@ -578,6 +580,7 @@ function M.setup(opts)
578580
colors.error = colors.red_warmer
579581
colors.warning = colors.magenta
580582
colors.info = colors.cyan
583+
colors.success = colors.tritanopia_fg_added
581584

582585
colors.cursor = colors.red_intense
583586
end

lua/modus-themes/extras/aerc.lua

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
local util = require("modus-themes.util")
2+
3+
local M = {}
4+
5+
--- @param colors ColorScheme
6+
function M.generate(colors)
7+
local aerc = util.template(
8+
[[
9+
# Modus Themes for Aerc
10+
# Auto generated with https://github.com/miikanissi/modus-themes.nvim/blob/master/lua/modus-themes/extras/aerc.lua
11+
12+
*.default=true
13+
*.normal=true
14+
15+
*.bg = ${bg_main}
16+
*.fg = ${fg_main}
17+
*.selected.bg = ${bg_main}
18+
*.selected.fg = ${fg_main}
19+
20+
title.bg=${bg_blue_subtle}
21+
title.fg=${fg_main}
22+
title.bold=true
23+
24+
header.bold=true
25+
header.fg=${accent}
26+
header.bg=${bg_main}
27+
28+
border.bg=${border}
29+
border.fg=${border}
30+
31+
tab.selected.fg=${fg_main}
32+
tab.selected.bg=${bg_blue_intense}
33+
tab.selected.bold=false
34+
dirlist*.selected.bg=${bg_hl_line}
35+
dirlist*.selected.fg=${fg_main}
36+
dirlist*.selected.bold=false
37+
38+
*error.bold=true
39+
*error.fg=${error}
40+
*warning.fg=${warning}
41+
*success.fg=${success}
42+
43+
statusline_*.bg=${bg_status_line_active}
44+
statusline_*.fg=${fg_status_line_active}
45+
statusline_error.fg=${error}
46+
47+
msglist_unread.fg=${fg_main}
48+
msglist_unread.bold=true
49+
msglist_read.fg=${fg_dim}
50+
msglist_deleted.fg=${fg_removed}
51+
msglist_*.selected.bg=${bg_hl_line}
52+
msglist_marked.fg=${fg_main}
53+
msglist_marked.selected.fg=${fg_main}
54+
msglist_marked.bg=${bg_blue_subtle}
55+
msglist_marked.selected.bg=${bg_blue_intense}
56+
57+
completion_pill.reverse=false
58+
selector_focused.bold=false
59+
selector_focused.bg=${bg_hl_line}
60+
selector_focused.fg=${fg_main}
61+
selector_chooser.bold=false
62+
selector_chooser.bg=${bg_hl_line}
63+
selector_chooser.fg=${fg_main}
64+
default.selected.bold=false
65+
default.selected.bg=${bg_hl_line}
66+
default.selected.fg=${fg_main}
67+
68+
completion_default.selected.bg=${bg_completion}
69+
70+
[viewer]
71+
*.default=true
72+
*.normal=true
73+
74+
url.fg = ${fg_alt}
75+
header.fg = ${accent}
76+
77+
signature.fg = ${magenta_faint}
78+
diff_chunk.fg = ${fg_changed}
79+
diff_chunk_func.fg = ${fg_changed}
80+
diff_add.fg = ${fg_added}
81+
diff_del.fg = ${fg_removed}
82+
83+
quote_1.fg = ${accent}
84+
quote_2.fg = ${cyan_warmer}
85+
quote_3.fg = ${slate}
86+
quote_4.fg = ${indigo}
87+
quote_x.fg = ${yellow_faint}
88+
]],
89+
colors
90+
)
91+
92+
return aerc
93+
end
94+
95+
return M

lua/modus-themes/extras/init.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
local M = {}
55

66
-- map of plugin name to plugin extension
7-
--- @type table<string, {ext:string, url:string, label:string}>
7+
--- @type table<string, {ext:string?, url:string, label:string}>
88
-- stylua: ignore
99
M.extras = {
10+
aerc = { url = "https://git.sr.ht/~rjarry/aerc", label = "Aerc" },
1011
alacritty = { ext = "toml", url = "https://github.com/alacritty/alacritty", label = "Alacritty" },
1112
bat = { ext = "tmTheme", url = "https://github.com/sharkdp/bat", label = "Bat" },
1213
delta = { ext = "gitconfig", url = "https://github.com/dandavison/delta", label = "Delta" },
@@ -99,7 +100,10 @@ function M.setup()
99100
modus.load({ style = style })
100101
vim.cmd.colorscheme(style)
101102
local colors = require("modus-themes.colors").setup()
102-
local fname = extra .. "/" .. style .. "." .. info.ext
103+
local fname = extra .. "/" .. style
104+
if info.ext then
105+
fname = fname .. "." .. info.ext
106+
end
103107
colors["_upstream_url"] = "https://github.com/miikanissi/modus-themes.nvim/raw/master/extras/" .. fname
104108
colors["_style_name"] = style_name
105109
colors["_name"] = style

0 commit comments

Comments
 (0)