dotfiles/.config/wezterm/wezterm.lua

163 lines
4.8 KiB
Lua
Raw Normal View History

2022-12-03 14:42:03 +01:00
local wezterm = require("wezterm")
2023-03-07 10:42:16 +01:00
local mux = wezterm.mux
local act = wezterm.action
2021-04-01 16:02:19 +02:00
local dev_host = "dln-dev"
local spawn_dev_nvim = { "ssh", dev_host, "nvim", "--listen", os.getenv("XDG_RUNTIME_DIR") .. "/nvim-persistent.sock" }
2023-03-07 16:53:50 +01:00
local function font_with_fallback(name, params)
2023-03-07 10:42:16 +01:00
local names = { name, "Noto Color Emoji" }
2022-12-03 14:42:03 +01:00
return wezterm.font_with_fallback(names, params)
2021-04-01 16:02:19 +02:00
end
wezterm.add_to_config_reload_watch_list(os.getenv("HOME") .. "/.config/shelman-theme/current/wezterm")
2023-03-09 18:11:46 +01:00
2021-04-01 16:02:19 +02:00
return {
2023-03-09 18:11:46 +01:00
color_scheme = "Shelman Theme",
color_scheme_dirs = {
os.getenv("HOME") .. "/.config/shelman-theme/current/wezterm",
2023-03-09 18:11:46 +01:00
},
2023-05-08 00:15:03 +02:00
font = font_with_fallback("Iosevka Term SS09", { weight = "Light" }),
2022-12-03 14:42:03 +01:00
font_rules = {
{
italic = false,
intensity = "Half",
2023-06-25 21:18:44 +02:00
reverse = false,
2023-05-08 00:15:03 +02:00
font = font_with_fallback("Iosevka Term SS09", { weight = "Thin" }),
2022-12-03 14:42:03 +01:00
},
2023-06-25 21:18:44 +02:00
{
italic = false,
intensity = "Bold",
reverse = false,
font = font_with_fallback("Iosevka Term SS09", { weight = "DemiBold" }),
},
2022-12-03 14:42:03 +01:00
{
italic = true,
intensity = "Normal",
2023-06-25 21:18:44 +02:00
reverse = false,
2023-05-08 00:15:03 +02:00
font = font_with_fallback("Iosevka Term Curly Slab", { weight = "Light", italic = true }),
2022-12-03 14:42:03 +01:00
},
{
italic = true,
2023-06-25 12:40:29 +02:00
intensity = "Half",
2023-06-25 21:18:44 +02:00
reverse = false,
2023-05-08 00:15:03 +02:00
font = font_with_fallback("Iosevka Term SS15", { weight = "ExtraLight", italic = true }),
2022-12-03 14:42:03 +01:00
},
2023-06-25 12:40:29 +02:00
{
italic = true,
intensity = "Bold",
2023-06-25 21:18:44 +02:00
reverse = false,
2023-06-25 12:40:29 +02:00
font = font_with_fallback("Iosevka Term Curly Slab Ex", { weight = "Regular", italic = true }),
},
2023-06-25 21:18:44 +02:00
-- Reversed
2023-06-25 12:40:29 +02:00
{
reverse = true,
2023-06-25 21:18:44 +02:00
italic = false,
intensity = "Normal",
font = font_with_fallback("Iosevka Term SS09", { weight = "Regular" }),
},
{
reverse = true,
italic = false,
intensity = "Half",
font = font_with_fallback("Iosevka Term SS09", { weight = "Light" }),
},
{
reverse = true,
italic = true,
intensity = "Half",
font = font_with_fallback("Iosevka Term Curly Slab", { weight = "ExtraLight", italic = true }),
},
{
reverse = true,
italic = true,
intensity = "Normal",
font = font_with_fallback("Iosevka Term Curly Slab", { weight = "Light", italic = true }),
},
{
reverse = true,
italic = true,
2023-06-25 12:40:29 +02:00
intensity = "Bold",
2023-06-25 21:18:44 +02:00
font = font_with_fallback("Iosevka Term Curly Slab Ex", { weight = "Bold", italic = true }),
2023-06-25 12:40:29 +02:00
},
2022-12-03 14:42:03 +01:00
{
2023-06-25 21:18:44 +02:00
reverse = true,
italic = false,
2022-12-03 14:42:03 +01:00
intensity = "Bold",
2023-06-25 21:18:44 +02:00
font = font_with_fallback("Iosevka Term SS09", { weight = "Bold" }),
2022-12-03 14:42:03 +01:00
},
},
2023-06-14 09:48:19 +02:00
front_end = "WebGpu",
webgpu_power_preference = "HighPerformance",
2022-12-03 14:42:03 +01:00
warn_about_missing_glyphs = false,
bold_brightens_ansi_colors = false,
2022-12-06 17:19:07 +01:00
allow_square_glyphs_to_overflow_width = "Always",
2023-03-07 10:42:16 +01:00
font_size = 13.5,
2023-03-24 09:19:10 +01:00
command_palette_font_size = 13.5,
2023-05-08 00:15:03 +02:00
line_height = 1.065,
2023-03-09 18:11:07 +01:00
initial_cols = 132,
initial_rows = 45,
2023-03-07 10:42:16 +01:00
use_resize_increments = true,
2023-06-02 10:05:03 +02:00
adjust_window_size_when_changing_font_size = false,
2023-05-08 00:15:03 +02:00
window_padding = {
left = 0,
right = 0,
top = 0,
bottom = 0,
},
2022-12-03 14:42:03 +01:00
default_cursor_style = "SteadyBlock",
2023-07-01 10:11:24 +02:00
cursor_thickness = "6px",
cursor_blink_rate = 0,
2023-04-29 11:33:39 +02:00
hide_mouse_cursor_when_typing = false,
2022-12-03 14:42:03 +01:00
enable_wayland = true,
enable_tab_bar = false,
2022-12-03 14:42:03 +01:00
tab_bar_at_bottom = true,
use_fancy_tab_bar = false,
2022-12-03 14:42:03 +01:00
show_tab_index_in_tab_bar = true,
enable_scroll_bar = false,
scrollback_lines = 5000,
2023-03-09 18:11:07 +01:00
alternate_buffer_wheel_scroll_speed = 1,
2022-12-03 14:42:03 +01:00
check_for_updates = false,
status_update_interval = 100,
audible_bell = "Disabled",
term = "wezterm",
disable_default_key_bindings = true,
keys = {
2023-03-24 09:19:10 +01:00
{ key = "c", mods = "ALT|SHIFT", action = act.CopyTo("ClipboardAndPrimarySelection") },
2023-03-28 11:09:23 +02:00
{ key = "v", mods = "ALT|SHIFT", action = act.PasteFrom("Clipboard") },
2022-12-03 14:42:03 +01:00
{ key = "0", mods = "CTRL", action = "ResetFontSize" },
{ key = "-", mods = "CTRL", action = "DecreaseFontSize" },
{ key = "=", mods = "CTRL", action = "IncreaseFontSize" },
{ key = "Enter", mods = "ALT", action = "ToggleFullScreen" },
2023-03-07 10:42:16 +01:00
{ key = "r", mods = "ALT", action = act.ReloadConfiguration },
{ key = "L", mods = "CTRL", action = wezterm.action.ShowDebugOverlay },
2023-03-24 09:19:10 +01:00
{ key = "l", mods = "ALT", action = wezterm.action.ActivateCommandPalette },
2023-03-08 20:58:53 +01:00
{ key = "Backspace", mods = "ALT", action = act.SwitchWorkspaceRelative(1) },
2023-03-09 18:11:07 +01:00
{ key = "UpArrow", mods = "SHIFT", action = act.ScrollByLine(-1) },
{ key = "DownArrow", mods = "SHIFT", action = act.ScrollByLine(1) },
{ key = "PageUp", mods = "SHIFT", action = act.ScrollByPage(-0.5) },
{ key = "PageDown", mods = "SHIFT", action = act.ScrollByPage(0.5) },
},
mouse_bindings = {
{
event = { Down = { streak = 1, button = { WheelUp = 1 } } },
mods = "SHIFT",
action = act.ScrollByLine(-1),
},
{
event = { Down = { streak = 1, button = { WheelDown = 1 } } },
mods = "SHIFT",
action = act.ScrollByLine(1),
},
{
event = { Down = { streak = 1, button = { WheelUp = 1 } } },
action = act.ScrollByPage(-0.25),
},
{
event = { Down = { streak = 1, button = { WheelDown = 1 } } },
action = act.ScrollByPage(0.25),
},
2023-03-07 10:42:16 +01:00
},
2021-04-01 16:02:19 +02:00
}