local wezterm = require("wezterm")

-- Allow working with both the current release and the nightly
local config = {}
if wezterm.config_builder then
	config = wezterm.config_builder()
end

config.font = wezterm.font_with_fallback({
	{ family = "Fantasque Sans Mono" },
	{ family = "Iosevka Custom", weight = "Medium" },
})

config.font_rules = {
	{
		italic = true,
		font = wezterm.font_with_fallback({
			{ family = "Dank Mono", italic = true },
			{ family = "Fantasque Sans Mono", italic = true },
			{ family = "Iosevka Custom", weight = "Light" },
		}),
	},
}

config.font_size = 16.0
-- wayland?
config.enable_wayland = true
-- TERM name
config.term = "xterm-256color"

-- Color Scheme(s)
-- config.color_scheme = "Hopscotch.256"
config.color_schemes = {
	["Corvine"] = {
		background = "#262626",
		foreground = "#c6c6c6",
		-- ansi = {"black", "maroon", "green", "olive", "navy", "purple", "teal", "silver"},
		-- brights = {"grey", "red", "lime", "yellow", "blue", "fuchsia", "aqua", "white"},
		ansi = { "#3a3a3a", "#d7d7d7", "#87af5f", "#d7d7af", "#87afd7", "#afafd7", "#87d7d7", "#c6c6c6" },
		brights = { "#626262", "#ffafaf", "#afd787", "#d7d787", "#87d7ff", "#d7afd7", "#5fd7d7", "#eeeeee" },
	},
	["OceanicNext"] = {
		background = "#1b2b34",
		foreground = "#c0c5ce",
		-- Overrides the cell background color when the current cell is occupied by the
		-- cursor and the cursor style is set to Block
		cursor_bg = "#c0c5ce",
		-- Overrides the text color when the current cell is occupied by the cursor
		cursor_fg = "#1b2b34",
		ansi = { "#1b2b34", "#ec5f67", "#99c794", "#fac863", "#6699cc", "#c594c5", "#5fb3b3", "#c0c5ce" },
		brights = { "#65737e", "#ec5f67", "#99c794", "#fac863", "#6699cc", "#c594c5", "#5fb3b3", "#d8dee9" },
	},
	["Kanagawa"] = {
		-- force_reverse_video_cursor = true,
		foreground = "#dcd7ba",
		background = "#1f1f28",

		cursor_bg = "#c8c093",
		cursor_fg = "#c8c093",
		cursor_border = "#c8c093",

		selection_fg = "#c8c093",
		selection_bg = "#2d4f67",

		scrollbar_thumb = "#16161d",
		split = "#16161d",

		ansi = { "#090618", "#c34043", "#76946a", "#c0a36e", "#7e9cd8", "#957fb8", "#6a9589", "#c8c093" },
		brights = { "#727169", "#e82424", "#98bb6c", "#e6c384", "#7fb4ca", "#938aa9", "#7aa89f", "#dcd7ba" },
		indexed = { [16] = "#ffa066", [17] = "#ff5d62" },
	},
}
config.color_scheme = "Kanagawa"

-- Tab Bar
config.enable_tab_bar = true
config.hide_tab_bar_if_only_one_tab = true

config.front_end = "WebGpu"

return config