Prefer regular 'Iosevka' font in most cases, not the highly specific 'Iosevka Nerd Font'. This may break some things back in Archlinux-land but it is required for iosevka to be correctly displayed in Voidlinux, and, to be honest, also feels more clean than using such a highly specialized font for everything. Additionally, we generally make use of both where possible, defaulting to the more specific 'Nerd Font' family variant but falling back to regular old Iosevka. One exception is 'wezterm' which, though it nicely includes a font fallback option (and a very configurable one at that), _always_ produces a warning when the first font in a fallback list is not found -- even when the specific 'warn_about_missing_glyphs' option is ticked. No clue why but for now this works well enough for me.
80 lines
2.2 KiB
Lua
80 lines
2.2 KiB
Lua
local wezterm = require("wezterm")
|
|
|
|
local maps = require("maps")
|
|
|
|
require("statusbar").setup()
|
|
require("events").setup()
|
|
|
|
local function file_exists(name)
|
|
local f = io.open(name, "r")
|
|
if f ~= nil then
|
|
io.close(f)
|
|
return true
|
|
else
|
|
return false
|
|
end
|
|
end
|
|
|
|
-- automatically reload colors file
|
|
local colorsfile = (os.getenv("XDG_STATE_HOME") or (os.getenv("HOME") .. "/.local/state")) .. "/wezterm/colors.toml"
|
|
local colors = {}
|
|
if file_exists(colorsfile) == true then
|
|
wezterm.add_to_config_reload_watch_list(colorsfile)
|
|
colors = wezterm.color.load_scheme(colorsfile)
|
|
end
|
|
|
|
local settings = {
|
|
enable_wayland = true,
|
|
enable_tab_bar = true,
|
|
hide_tab_bar_if_only_one_tab = true,
|
|
use_fancy_tab_bar = false,
|
|
tab_bar_at_bottom = true,
|
|
window_padding = { left = 0, right = 0, top = 0, bottom = 0 },
|
|
colors = colors,
|
|
color_scheme = "Nord (base16)", -- will be overwritten by colors
|
|
-- default_prog = {"nu"},
|
|
scrollback_lines = 10000,
|
|
font = wezterm.font_with_fallback({
|
|
{ family = "Iosevka", weight = "Regular", italic = false },
|
|
{ family = "Iosevka Nerd Font", weight = "Regular", italic = false },
|
|
}),
|
|
-- add cursive italic font from Victor font for all weights
|
|
font_rules = {
|
|
{
|
|
italic = true,
|
|
intensity = "Bold",
|
|
font = wezterm.font_with_fallback({
|
|
{ family = "Iosevka", weight = "Bold", italic = true },
|
|
{ family = "VictorMono Nerd Font", weight = "Bold", style = "Italic" },
|
|
}),
|
|
},
|
|
{
|
|
italic = true,
|
|
intensity = "Half",
|
|
font = wezterm.font_with_fallback({
|
|
{ family = "Iosevka", weight = "DemiBold", italic = true },
|
|
{ family = "VictorMono Nerd Font", weight = "DemiBold", style = "Italic" },
|
|
}),
|
|
},
|
|
{
|
|
italic = true,
|
|
intensity = "Normal",
|
|
font = wezterm.font_with_fallback({
|
|
{ family = "Iosevka", weight = "Bold", italic = true },
|
|
{ family = "VictorMono Nerd Font", style = "Italic" },
|
|
}),
|
|
},
|
|
},
|
|
line_height = 1.0,
|
|
leader = { key = "a", mods = "CTRL", timeout_milliseconds = 1500 },
|
|
keys = maps.keys,
|
|
key_tables = maps.key_tables,
|
|
mouse_bindings = {
|
|
{
|
|
event = { Up = { streak = 1, button = "Left" } },
|
|
mods = "NONE",
|
|
action = wezterm.action.CompleteSelectionOrOpenLinkAtMouseCursor("ClipboardAndPrimarySelection"),
|
|
},
|
|
},
|
|
}
|
|
return settings
|