2022-11-16 17:29:02 +00:00
|
|
|
local wezterm = require 'wezterm'
|
|
|
|
|
|
|
|
local maps = require 'maps'
|
|
|
|
|
2022-11-25 15:21:20 +00:00
|
|
|
require 'statusbar'.setup()
|
|
|
|
require 'events'.setup()
|
2022-11-16 17:29:02 +00:00
|
|
|
|
2023-03-03 17:41:06 +00:00
|
|
|
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
|
|
|
|
|
2023-03-21 17:57:27 +00:00
|
|
|
local settings = {
|
2022-11-16 17:29:02 +00:00
|
|
|
enable_wayland = true,
|
|
|
|
hide_tab_bar_if_only_one_tab = true,
|
|
|
|
use_fancy_tab_bar = false,
|
|
|
|
tab_bar_at_bottom = true,
|
2022-11-25 15:21:20 +00:00
|
|
|
window_padding = { left = 0, right = 0, top = 0, bottom = 0 },
|
2023-03-03 17:41:06 +00:00
|
|
|
colors = colors,
|
|
|
|
color_scheme = "Nord (base16)", -- will be overwritten by colors
|
2022-11-16 17:29:02 +00:00
|
|
|
-- default_prog = {"nu"},
|
|
|
|
scrollback_lines = 10000,
|
2023-01-19 17:28:20 +00:00
|
|
|
font = wezterm.font('Iosevka Nerd Font'),
|
2023-03-22 10:14:25 +00:00
|
|
|
-- add cursive italic font from Victor font for all weights
|
|
|
|
font_rules = {
|
|
|
|
{
|
|
|
|
intensity = 'Bold',
|
|
|
|
italic = true,
|
|
|
|
font = wezterm.font {
|
|
|
|
family = 'VictorMono Nerd Font',
|
|
|
|
weight = 'Bold',
|
|
|
|
style = 'Italic',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
italic = true,
|
|
|
|
intensity = 'Half',
|
|
|
|
font = wezterm.font {
|
|
|
|
family = 'VictorMono Nerd Font',
|
|
|
|
weight = 'DemiBold',
|
|
|
|
style = 'Italic',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
italic = true,
|
|
|
|
intensity = 'Normal',
|
|
|
|
font = wezterm.font {
|
|
|
|
family = 'VictorMono Nerd Font',
|
|
|
|
style = 'Italic',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-11-16 17:29:02 +00:00
|
|
|
line_height = 1.0,
|
2022-11-25 15:21:20 +00:00
|
|
|
leader = { key = 'a', mods = 'CTRL', timeout_milliseconds = 1500 },
|
2022-11-16 17:29:02 +00:00
|
|
|
keys = maps.keys,
|
2023-03-07 10:44:14 +00:00
|
|
|
key_tables = maps.key_tables,
|
2023-03-21 17:57:27 +00:00
|
|
|
mouse_bindings = {
|
|
|
|
{
|
|
|
|
event = { Up = { streak = 1, button = 'Left' } },
|
|
|
|
mods = 'NONE',
|
|
|
|
action = wezterm.action
|
2023-05-23 13:47:08 +00:00
|
|
|
.CompleteSelectionOrOpenLinkAtMouseCursor
|
|
|
|
'ClipboardAndPrimarySelection'
|
2023-03-21 17:57:27 +00:00
|
|
|
}
|
|
|
|
}
|
2022-11-16 17:29:02 +00:00
|
|
|
}
|
2023-03-21 17:57:27 +00:00
|
|
|
return settings
|