2022-12-19 17:50:20 +01:00
|
|
|
local wezterm = require("wezterm")
|
|
|
|
|
|
|
|
local M = {}
|
|
|
|
|
|
|
|
M.scheme_for_appearance = function(appearance, theme)
|
2023-01-04 13:22:00 +01:00
|
|
|
if string.match(wezterm.target_triple, "linux") then
|
|
|
|
return theme.dark
|
|
|
|
end
|
|
|
|
if appearance:find("Dark") then
|
|
|
|
return theme.dark
|
|
|
|
else
|
|
|
|
return theme.light
|
|
|
|
end
|
2022-12-19 17:50:20 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
M.get_custom_colorschemes = function()
|
2023-01-04 13:22:00 +01:00
|
|
|
local oledppuccin = wezterm.color.get_builtin_schemes()["Catppuccin Mocha"]
|
|
|
|
oledppuccin.background = "#000000"
|
|
|
|
oledppuccin.tab_bar.background = "#040404"
|
|
|
|
oledppuccin.tab_bar.inactive_tab.bg_color = "#0f0f0f"
|
|
|
|
oledppuccin.tab_bar.new_tab.bg_color = "#080808"
|
2022-12-19 17:50:20 +01:00
|
|
|
|
2023-01-04 13:22:00 +01:00
|
|
|
return {
|
2023-02-15 06:27:38 +01:00
|
|
|
["Catppuccin Americano"] = oledppuccin,
|
2023-01-04 13:22:00 +01:00
|
|
|
}
|
2022-12-19 17:50:20 +01:00
|
|
|
end
|
|
|
|
|
2023-03-05 05:40:35 +01:00
|
|
|
M.apply = function(c)
|
|
|
|
c.color_schemes = M.get_custom_colorschemes()
|
|
|
|
c.color_scheme = M.scheme_for_appearance(wezterm.gui.get_appearance(), {
|
|
|
|
dark = "Catppuccin Americano",
|
|
|
|
light = "Catppuccin Latte",
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2022-12-19 17:50:20 +01:00
|
|
|
return M
|