local wezterm = require 'wezterm';

function font_with_fallback(name, params)
    local names = {name, "Noto Color Emoji", "JetBrains Mono", "Monaco"}
    return wezterm.font_with_fallback(names,params)
end

return {
    -- font stuff
    -- font = font_with_fallback("Iosevka Custom"),
    font = font_with_fallback("Iosevka Custom Light"),
    font_rules = {
        { 
            italic = true,
            font = font_with_fallback("Dank Mono", {italic=true}),
        },
    },
    font_size = 14.0,
    font_antialias = "Subpixel",
    font_hinting = "Full",
    font_shaper = "Harfbuzz",

    -- TERM name
    term = "xterm-256color",

    -- Color Scheme(s)
    color_scheme = "Hopscotch.256",
    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"}
        },
    },

    -- Tab Bar
    enable_tab_bar = true,
    hide_tab_bar_if_only_one_tab = true,
}