dotfiles-pub/common/.wezterm.lua

134 lines
3.4 KiB
Lua
Raw Normal View History

2022-08-08 16:52:23 +00:00
local wezterm = require("wezterm");
2022-08-12 18:36:38 +00:00
local config = {
2022-08-08 16:52:23 +00:00
font_size = 9.0,
freetype_load_target = "Mono",
2022-11-08 16:36:46 +00:00
use_cap_height_to_scale_fallback_fonts = true,
2022-12-18 04:35:26 +00:00
bold_brightens_ansi_colors = true,
color_scheme = "Amora Focus",
hide_tab_bar_if_only_one_tab = true,
2022-08-08 16:52:23 +00:00
window_padding = {
left = 4,
right = 4,
top = 4,
bottom = 4,
},
use_fancy_tab_bar = false,
2023-03-02 05:02:33 +00:00
tab_bar_at_bottom = false,
2022-08-12 18:36:38 +00:00
launch_menu = {},
keys = {
-- disable search (ctrl f = tab)
{key = "f", mods = "CTRL|SHIFT", action = "DisableDefaultAssignment"},
2022-09-01 23:48:07 +00:00
-- launcher
{key = "Space", mods = "CTRL|SHIFT", action = "ShowLauncher"},
-- , and . navigation between tabs
{key = "<", mods = "CTRL|SHIFT", action = wezterm.action.ActivateTabRelative(-1)},
{key = ">", mods = "CTRL|SHIFT", action = wezterm.action.ActivateTabRelative(1)},
2022-09-01 23:48:07 +00:00
},
mouse_bindings = {
-- Change the default selection behavior so that it only selects text,
-- but doesn't copy it to a clipboard or open hyperlinks.
{
event={Up={streak=1, button="Left"}},
mods="NONE",
action=wezterm.action{ExtendSelectionToMouseCursor="Cell"}
},
2022-09-01 23:48:07 +00:00
-- Don't automatically copy the selection to the clipboard
-- when double clicking a word
{
event={Up={streak=2, button="Left"}},
mods="NONE",
action="Nop",
},
2022-09-01 23:48:07 +00:00
-- Ctrl-click will open the link under the mouse cursor
{
event={Up={streak=1, button="Left"}},
mods="CTRL",
action="OpenLinkAtMouseCursor",
},
2022-08-12 18:36:38 +00:00
},
2023-03-02 05:02:33 +00:00
color_scheme_dirs = {},
2022-08-12 18:36:38 +00:00
}
if wezterm.target_triple == "x86_64-pc-windows-msvc" then
2023-03-02 05:02:33 +00:00
config.default_prog = {"C:/Program Files/PowerShell/7/pwsh.exe", "-NoLogo"}
-- config.default_cwd = "D:/Downloads"
2022-08-12 18:36:38 +00:00
config.font = wezterm.font_with_fallback({
"Terminus (TTF)",
2022-09-24 04:08:24 +00:00
"Unifont Windows",
2022-08-12 18:36:38 +00:00
"SijiNGWindows",
2022-09-01 23:48:07 +00:00
"Noto Emoji",
2022-08-12 18:36:38 +00:00
})
config.unix_domains = {
2022-08-08 16:52:23 +00:00
{
name = "unix",
},
2022-08-12 18:36:38 +00:00
}
2022-10-16 03:20:55 +00:00
-- config.default_gui_startup_args = {"connect", "unix"}
2022-08-12 18:36:38 +00:00
2023-03-02 05:02:33 +00:00
config.color_scheme_dirs[#config.color_scheme_dirs + 1] = "D:/Misc/dotfiles-pub/common/wezterm/colors"
--[[table.insert(config.launch_menu, {
2022-08-12 18:36:38 +00:00
label = "MSYS2",
args = {
"C:/msys64/msys2_shell.cmd",
"-no-start","-defterm","-msys2",
},
})
table.insert(config.launch_menu, {
label = "MinGW64",
args = {
"C:/msys64/msys2_shell.cmd",
"-no-start","-defterm","-mingw64",
},
})
2022-09-01 23:48:07 +00:00
table.insert(config.launch_menu, {
label = "cygwin",
args = {
"D:/Programs/cygwin/bin/bash",
"--login",
},
2023-03-02 05:02:33 +00:00
})--]]
2022-08-12 18:36:38 +00:00
else
2022-11-30 19:20:47 +00:00
local function fallback(font)
return wezterm.font_with_fallback({
font,
"Fixed",
"Terminus (TTF)",
"Sazanami Gothic",
"Unifont",
"Noto Emoji",
})
end
config.font = fallback("tewi")
config.font_rules = {
{
intensity = "Bold",
2022-12-18 04:35:26 +00:00
font = fallback({family = "tewi", style = "Normal"}),
2022-11-30 19:20:47 +00:00
},
{
italic = true,
font = fallback({family = "orp", style = "Italic"}),
},
{
intensity = "Bold",
italic = true,
font = fallback({family = "orp", style = "Italic"}),
}
}
--[[config.font = wezterm.font_with_fallback({
{family = "tewi", style = "Normal"},
{family = "tewi", style = "Normal", weight = "Bold"},
{family = "orp", style = "Italic"},
{family = "orp", style = "Italic", weight = "Bold"},
2022-11-08 16:36:46 +00:00
"Terminus (TTF)",
2022-08-12 18:36:38 +00:00
"Unifont",
2022-09-01 23:48:07 +00:00
"Noto Emoji",
2022-11-30 19:20:47 +00:00
})--]]
2022-08-12 18:36:38 +00:00
end
return config